-
Notifications
You must be signed in to change notification settings - Fork 86
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
encodeImage no support for compression #121
Comments
@jardicc, You've mentioned in the below issue that it shouldn't be hard to use existing compression while encoding new Tiff image. Could you elaborate? |
It was in 2021. I was able to do that for my project. But I would need to spend some time to recall the details. Utif can decode compressed pixels so you would do the same but with encoding. |
If you need to store compressed images, I recommend you to use the PNG format instead of TIFF. The PNG is a better format, and it is supported pretty much everywhere. You can use our library https://github.com/photopea/UPNG.js |
We already had this discussion before. TIFF can support all features as PSD due to Adobe's proprietary section + much more. You can even replace PSD with TIFF and produce smaller files due to better bitmap compressions. PNG is just a flat image ¯_(ツ)_/¯ If you would use PNGs to recreate layers functionality then you would be reinventing a new image format because you would need some "glue". If I remember correctly to support compression in UTIF... you would need to write about 5 lines of code? |
"TIFF can support all features as PSD due to Adobe's proprietary section" you are suggesting to make files, which have the "tiff" extension, but are openable only in Adobe Photoshop. I really dont recommend to do so. You should use the PSD, if you want layers. PSD files can be opened in more programs, even in some free programs. |
@jardicc, could you recall what you did in 2021 for your project? Any code reference would be helpful. |
UTIF.encodeImage currently encodes a new Tiff with no compression. This blows up the size of the output TIFF.
Is there a plan to support different compressions like LZW, G4, etc for encodeImage?
Also, could you provide any pointers to build my own image encoder with compression? Unsure how to start off with this.
The text was updated successfully, but these errors were encountered: