Jump to content

Saving as 16bit PNG


Recommended Posts

Greetings,

I have a need to save an image as a 16bit grayscall PNG. I've looked through the first few pages of plugins finding nothing useful. The search function returned zero results for "PNG".  So, does anyone know of a plugin/addon that would give Paint.net this functionality?

Link to comment
Share on other sites

No, that only gives me an 8bit PNG.

I did find LowColor  plugin.  It looks to be  buggy and broken. As it says it can output 16bit PNGs, but they end up as 32bit.

I'm trying to make height maps for custom game maps but they all require 16bit grayscale PNG images.  Photoshop can do it. Unfortunately, I don't have the money for that, nor is it worth it for such a limited task. 

Link to comment
Share on other sites

Hmm. Well even if Paint.NET supported saving as 16-bit grayscale, it wouldn't be able to load it back in correctly. Paint.NET only ever uses 32-bit RGBA, and thus once you opened it again it would be as if you'd saved as 8-bit grayscale. (each color component is 8-bits)

In any case, Paint.NET just isn't a map editor ...

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

I'm not editing a map.  I'm getting a grayscale image from a geographic map program. That image is a grayscale graphical representation of the elevation of the selected area from a real world map. I use Paint.net, or would like to, to smooth out the gradient, lighten or darken areas, etc.. The problem is that I then can not save the resulting image in a format the map editor will accept. Which is a 16bit PNG. 

Link to comment
Share on other sites

Right, I figured out that much. But like I said, even if Paint.NET could save as 16-bit grayscale, it would lose a lot of precision when it opened the same image again later.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

I had to do this for some heightmaps too recently, and I can say that if you head over to the "Sims 3" forums and search around a bit there (or post a new topic) you'll find a program that suits your purposes perfectly. Can't remember what it was called...

Link to comment
Share on other sites

Right, I figured out that much. But like I said, even if Paint.NET could save as 16-bit grayscale, it would lose a lot of precision when it opened the same image again later.

So, you are saying that Paint.net does not fully implement the PNG standard and does not work well for grayscale images and photos. Which is my other need as I will be, sooner or later, scanning many old B&W photos for the family genealogy.

Link to comment
Share on other sites

I had to do this for some heightmaps too recently, and I can say that if you head over to the "Sims 3" forums and search around a bit there (or post a new topic) you'll find a program that suits your purposes perfectly. Can't remember what it was called...

Yeah, I found that. Just one more I was hoping not to add to the many one task utilities I have. Also, it means I can not edit a height map as I will just end up with 8bit data in a 16bit image.  So, I get stepping in the world editor. I can use the terrain smoothing tool to fix it. It is just that not all game world editors have that function. Not to mention that you end up with a some what distorted smoothed out form of what you started with.

Link to comment
Share on other sites

Ah, I just remembered the one I used: RAW Therapee.

Yeah, I've searching the various boards and found that. Basic but works. I was just hoping to use a more feature rich program and one that is not Alpha Release 1.

Looking over the list at the LibPNG website was not much help. Though if there was a Windows version of Cinepaint, that would rock. That is some serious hardcore overkill for me with 32bits per channel!

I also found JImage, a java image manipulation program. Pretty basic, but a few more features than Therapee and runs on anything.

Link to comment
Share on other sites

I'm sorry I can't help you any further, but I'm glad you appear to be successful in your research.

I as just wondering, why do heightmaps need to be 16-bit? It REALLY annoyed me when I had to use them, and it would be so much easier to use 8-bit.

8bits is only 0 to 255. So, you would only be able to represent 255 feet of elevation. Maps in Sims 3 can have a max elevation of 300. Other games and applications have much higher max elevations. From my research on the issue, 16bit gray scale PNGs are the standard for heightmaps. As if you are modeling the real world, you would need 16bits. The upper limit would be needed if say you were modeling an area that included Mount Everest, the highest mountain on Earth at 8,848 metres (29,029 ft) and the deepest part of the Mariana Trench at 2,076 metres (6,811 ft) below sea level.

While most games don't have maps more than a few hundred feet in elevation, using what is standard allows for the import of data already available from other uses and sources. As such, I can go to the USGS website and get the elevation data I need and export it from the viewer. Then all I have to do is size it to the scale I need, crop it to the map size I want, smooth or otherwise edit any areas that might not work well in the game I'm making the map for, then save it back as a 16bit greyscale PNG like I got from the viewer. Load it up in the editor and make the map.

Link to comment
Share on other sites

Paint.NET only works with 8-bits per color channel. No more, no less. Other color depths are supported when saving or loading, but when it's in memory it's always 8-bits per color component (32-bit RGBA). Even a 1-bit monochrome TIFF from a fax machine gets expanded to 32-bits when opened (which is why you see people asking, "I opened a 800KB TIFF and it said out of memory whyyyyyyyy").

You won't be able to use Paint.NET for this purpose.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Paint.NET only works with 8-bits per color channel. No more, no less. Other color depths are supported when saving or loading, but when it's in memory it's always 8-bits per color component (32-bit RGBA). Even a 1-bit monochrome TIFF from a fax machine gets expanded to 32-bits when opened (which is why you see people asking, "I opened a 800KB TIFF and it said out of memory whyyyyyyyy").

You won't be able to use Paint.NET for this purpose.

Okay, Grayscale and B&W photo work is not Paint.net's thing. Gottcha.

"Cannot run out of time. There is infinite time. You are finite. Zathras is finite. This....is wrong tool."  - Zathras (Babylon 5)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...