how can i convert 32bit jpeg image in 24bit? or convert it into 24bit bitmap?
The build in library does not support 32-bit jpeg. Try the nativejpg library. see also handling CMYK jpeg files in Delphi 7
Related
For a project I'm currently working on, I'm trying to convert a bunch of PNG images to HEIF/HEIC. These images will be used in Xcode's .xcassets, which will then be "compiled" into a .car file.
Compiling the PNGs (~150 total files) results in ~40 MB of Assets.car, which is why I'm trying to convert them to HEIF/HEIC in the first place. I've tried various solutions, such as ImageMagick, "Export as" in GIMP, biodranik/HEIF, libheif's heif-enc, exporting a PNG as 8-bit or 16-bit in Photoshop and doing everything all over again. But everything results in the .heic file being "broken" on iOS. The first image shows the best output I've got so far, but still fringes around the edges. The white rounded rectangle on the right is iOS' Face ID padlock.
The second image is (I think) a 16-bit PNG converted to HEIC using libheif#1.8.0, upgraded through Homebrew. Lossless quality preset, 10-bit output. heif-enc complained about the color space being converted from RGB to YCbCr, stating even though you specified lossless compression, there will be differences because of the color conversion
Is there any way to properly convert PNG files to HEIF/HEIC without such quality loss? Please don't suggest online services to convert files, as I'd like to keep total control of my files.
Note: To get lossless encoding, you need this set of options. Try :-
-L switch encoder to lossless mode
-p chroma=444 switch off color subsampling
--matrix_coefficients=0 encode in RGB color-space
I have not been able to find any info on creating a TIFF on iOS (or converting a jpg or getting a TIFF representation from a UIImage) in the search engines.
I need to create a TIFF image, preferably from my UIImage or converting from a jpg representation. I see PNG and JPG support but nothing for TIFF images.
The service I am uploading images to requires TIFF (signature capture).
Any help appreciated.
I'm trying to use chunky_png for reading PNG image in Ruby on Rails. the library seems to work fine reading 8-bit PNG image. However, what I actually have is 16-bit grayscale PNG image and I want to retriev pixel brightness value of certain points. All of my attempts on retrieving pixel value always end-up with 8-bit rgba format.
Is there any way to read 16-bit brightness value from grayscale png image using chunky_png? Or should I give up and use some other tools that can do this job instead?
Because of how ChunkyPNG stores color values internally, it doesn't support more than 8 bit colors per channel. It automatically converts channels to 8 bit values when it encounters higher values.
So, this is impossible now, and would require some significant rewrites of the codebase to make this possible (but pull requests are accepted! :)
I'm having a really hard time working with some source images in PNG format that have premultiplied alpha because most tools simply do not support it correctly.
Is there anything out there that can do a "best guess" conversion to a more conventional PNG?
If by "premultiplied alpha" you mean iOS's PNG derivative, then you can convert them back to PNGs with pngdefry.
Standard PNGs never use premultiplied alpha.
guys , can anyone explain me why when im converting my jpeg into new file with command line:
convert -quality 80 file.jpg file2.jpg
File size is 20Kb
But if i open this file with Gimp and just save is as file2.jpg with quality 80, i have 10Kb size.
The quality scales used by imagemagick and GIMP are probably different. JPEG is a fairly complex format, and it has more parameters than one simple "quality" setting. For example, the type of chroma sub-sampling (4:2:0 vs 4:2:2, etc).
Here's what the GIMP documentation says about this:
The JPEG algorithm is quite complex, and involves a bewildering number of options, whose meaning is beyond the scope of this documentation. Unless you are a JPEG expert, the Quality parameter is probably the only one you will need to adjust.
This is likely to be true for other applications (such as PhotoShop, etc) as well.
Play around with some of the other parameters in both GIMP and imageMagick and it is likely that you will get similar results. If you post your image, then people may be more inclined to play around with it.
convert -quality 80 -type palette -strip -depth 8 file.jpg file2.jpg
This solve the problem and the file size is very similar to gimp or photoshop.