You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let offset = base64.find(',').unwrap_or(base64.len())+1;
letmut value = base64;
value.drain(..offset);
return value.from_base64().unwrap();
}
If base64 can get ','
offset = location of ',' +1
drain the header "data:image/jpeg;base64,"
else base64 don't contain ',' (only have base64 data)
offset = base64 length +1 drain will purge the data
endif
if no ',' the offset should set to 0 to avoid drain.
The text was updated successfully, but these errors were encountered:
image-base64-rs/src/lib.rs
Lines 31 to 36 in 9f7412b
If base64 can get ','
offset = location of ',' +1
drain the header "data:image/jpeg;base64,"
else base64 don't contain ',' (only have base64 data)
offset = base64 length +1
drain will purge the data
endif
if no ',' the offset should set to 0 to avoid drain.
The text was updated successfully, but these errors were encountered: