GIMP save PNG in 16 and 24 bit

42,021

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.

Lolcat 16 bit

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.

Share:
42,021

Related videos on Youtube

mypoint
Author by

mypoint

Updated on September 18, 2022

Comments

  • mypoint
    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:

    enter image description here

    • Tetsujin
      Tetsujin over 8 years
      I 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
      mypoint over 8 years
      I have never used GIMP so I don't know any other way to convert it. :/
    • Tetsujin
      Tetsujin over 8 years
      but you don't want indexed colour - read the link
    • mypoint
      mypoint over 8 years
      I had a bad idea that I should not, but that was the only place I could find in GIMP that actually changes something.
    • jrh
      jrh over 7 years
      For 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
      jrh over 6 years
    • KeyC0de
      KeyC0de over 4 years
      There is no 24bit PNG. The maximum bit depth for png is 16bit. Perhaps you meant PNG-24 which refers to something else entirely.
  • mypoint
    mypoint over 8 years
    Thanks! :) But how do I save it in 24bit ? Gimp seems complex.
  • mypoint
    mypoint over 8 years
    I 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
    jcbermu over 8 years
    16 bits .png files are not supported on GIMP.
  • mypoint
    mypoint over 8 years
    I found this image too, but I don't have such option :(
  • Michael Schumacher
    Michael Schumacher over 8 years
    Please 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
    Michael Schumacher over 8 years
    Just 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
    SPRBRN over 8 years
    Thanks 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
    mypoint over 8 years
    Gimp is very confusing to use.
  • SPRBRN
    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
    SPRBRN over 8 years
    The 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
    mypoint over 8 years
    @MichaelSchumacher So for 16bit I need Gray and add alpha ?
  • mypoint
    mypoint over 8 years
    Grayscale and alpha mode gives me 32bit image. Grayscale gives me 8bit
  • mypoint
    mypoint over 8 years
    @SPRBRN tried using Greyscale and Alpha, but it gives 32bit :/ :( Why gimp is so frustrating...?
  • mypoint
    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
    SPRBRN over 8 years
    I've solve it. See my updated answer and the included picture.
  • Michael Schumacher
    Michael Schumacher over 8 years
    Usually, 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
    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
    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
    SPRBRN over 8 years
    I'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
    SPRBRN over 8 years
    If the answer has helped you fix your problem, accept the answer and upvote useful comments.