Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-deterministic compression of some images #829

Open
ashutosh1206 opened this issue May 12, 2022 · 1 comment
Open

Non-deterministic compression of some images #829

ashutosh1206 opened this issue May 12, 2022 · 1 comment
Labels
backlog Things that are not actively worked on and won't be in the near future

Comments

@ashutosh1206
Copy link
Contributor

ashutosh1206 commented May 12, 2022

I just checked by uploading featuredPhoto in latest commit of capsule-vue and capsule-orbit, and I get the same photoCID each time. I did the same on this branch of capsule-orbit with latest commit of capsule-vue, same results.

After some additional investigation with @ashutosh1206, it seems that the compression output is nondeterministic for some images. One sign of this was that the file size of the compressed upload image was very slightly different between uploads, on the order of 0.01 KiB. To confirm, I updated the frontend to directly upload the featured photo without compressing it. With that update, a photo that previously had a different CID between uploads now had the same CID.

Curious to hear additional thoughts on what we can do on the compression side -- e.g. can we modify the function call to make the result deterministic (it doesn't seem so, based on the options you can pass to the function), use a different compression library/function, or possibly just not compress the images for now?

Originally posted by @dgrisham in https://github.com/capsulesocial/capsule-orbit/issues/421#issuecomment-1125237177

@ashutosh1206 ashutosh1206 transferred this issue from another repository May 12, 2022
@ashutosh1206
Copy link
Contributor Author

Image to reproduce:

cover

@ashutosh1206 ashutosh1206 added the backlog Things that are not actively worked on and won't be in the near future label Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Things that are not actively worked on and won't be in the near future
Projects
None yet
Development

No branches or pull requests

1 participant