GIMP save PNG in 16 and 24 bit
Solution 1
For 16 bit you need to change the image mode to grayscale, with only two channels - grayscale and alpha - and save that as PNG. Then you have a 16 bit image.
- Open a color JPEG
- Change the mode to grayscale - it should have one layer now
- Add an alpha layer
- Save the image to PNG via the export menu
You need to test which options you need to check in the export menu. I've checked them all, and that creates a 16 bit grayscale image with an alpha layer.
Solution 2
I have found that only Gimp 2.9 (the development branch) can save 16bit PNG. In Gimp 2.9 there is a "precision" menu option which lets you pick the precision. It is also capable of saving 16bit PNG, which Gimp 2.8 appears incapable of (even if you load a 16bit PNG, it will export it as 8bit).
Solution 3
Don't use Indexed, use RGB. However, I think that GIMP lacks of the 16 bit option, only 24 or 32 bits.
Indexed images contains 256 colors or less. This always result in fading shades or patches in areas with color changes.
Related videos on Youtube
mypoint
Updated on September 18, 2022Comments
-
mypoint over 1 year
I have a .png image which I need to save in 24 and 16bit using gimp. I went to Image -> Mode -> Indexed, but maximum value is 256 colors. I tried to paste in 16777216 colors for 24bit, but it did revert back to 256. I also tried 16bit 65536 colors, but it also reverted back. I'm using OSX gimp version, don't know if it changes anything. I need this for school. In photoshop it's a lot easier, but unfortunately I can't use photoshop.
Image:
-
Tetsujin over 8 yearsI don't know Gimp at all, so can't give you the actual answer - but why are you trying to convert it to indexed colour which is maximum 8-bit?
-
mypoint over 8 yearsI have never used GIMP so I don't know any other way to convert it. :/
-
Tetsujin over 8 yearsbut you don't want indexed colour - read the link
-
mypoint over 8 yearsI had a bad idea that I should not, but that was the only place I could find in GIMP that actually changes something.
-
jrh over 7 yearsFor those of you landing on this question from google wondering what bpp formats are supported by .png, Wikipedia has a nice table here, note that the smallest bit per channel value for a color image is 8, there is no such thing as 4 bits per channel color. Note that .BMP does seem to support "4 bits per color component", though.
-
jrh over 6 yearsAlso, related topic on Unix.SE
-
KeyC0de over 4 yearsThere is no 24bit PNG. The maximum bit depth for png is 16bit. Perhaps you meant PNG-24 which refers to something else entirely.
-
-
mypoint over 8 yearsThanks! :) But how do I save it in 24bit ? Gimp seems complex.
-
mypoint over 8 yearsI did google and to get 24bit I just have to export as png and it will be 24bit. Now how do I get 16bit ?
-
jcbermu over 8 years16 bits .png files are not supported on GIMP.
-
mypoint over 8 yearsI found this image too, but I don't have such option :(
-
Michael Schumacher over 8 yearsPlease note that this is the precision per RGBA component - if you choose 16 bit integer there, you will get an image with up to 64 bit (16 bit per R, G, B and A component). See en.wikipedia.org/wiki/Portable_Network_Graphics#Pixel_format
-
Michael Schumacher over 8 yearsJust in case it isn't obvious: 32 bit* PNG files have an alpha channel (8 bit per R, G, B and A = 32 bit), 24 bit PNG file don't (8 bit per R, G and B = 24 bit). [* still ambiguous if we take 16-bit-per-component Gray+Alpha PNG files into account].
-
SPRBRN over 8 yearsThanks for that insight. For this question you would need to save the image without transparency, and I have no idea how to that. In Photoshop there is a checkbox if I remember correctly. Here I don't see one.
-
mypoint over 8 yearsGimp is very confusing to use.
-
SPRBRN over 8 years(1) Why can't you use Photoshop - because you don't have it, of because you're force to use Gimp? If this is about learning Gimp, then tell us so we know this has to be a Gimp solution. If not, there are several alternatives to get around this. (2) Why do you need a 16 bit PNG? Is that school assignment? Does that even exist? Maybe this is just to challenge you and see what you come up with. The answer could be: it doesn't exist.
-
SPRBRN over 8 yearsThe only way to get 16 bit is converting to grayscale, then there's 8 bit for the grayscale, and 8 bit for the alpha. But when I export to PNG, and reopen it, it reports 4 channels. Still I guess this is the way to get there.
-
mypoint over 8 years@MichaelSchumacher So for 16bit I need Gray and add alpha ?
-
mypoint over 8 yearsGrayscale and alpha mode gives me 32bit image. Grayscale gives me 8bit
-
mypoint over 8 years@SPRBRN tried using Greyscale and Alpha, but it gives 32bit :/ :( Why gimp is so frustrating...?
-
mypoint over 8 years@SPRBRN I do have Photoshop, but I am not allowed to use it for this school assignment. That's because I have to take screenshots of step-by-step process of how I got image to be 24bit 16bit and so teacher can compare to other students. I got around the problem by using nightly build version of gimp that has precision option.
-
SPRBRN over 8 yearsI've solve it. See my updated answer and the included picture.
-
Michael Schumacher over 8 yearsUsually, what you need should be obvious from the context. You didn't provide much of that in your question. What task will the images be used for?
-
mypoint over 8 years@MichaelSchumacher It will not be used for anything. I only need to show step-by-step how I got the image to be 16bit and show the 16bit image.
-
mypoint over 8 years@SPRBRN I did excatly the same, but I get 32bit image.... I added image that I need to make 16bit in the original post.
-
SPRBRN over 8 yearsI'm not going to do your assignment. I've given a solution. You can download my image and see if it's 16 bit or not. Follow my exact solutions - so export with all options checked (and do not save for web). I tried again with your image and that worked for me.
-
SPRBRN over 8 yearsIf the answer has helped you fix your problem, accept the answer and upvote useful comments.