Jump to content

Packed Pixels Mode


Recommended Posts

After a recent update to paint.net, it seems that images are being saved in an image format called packed pixels (P) instead of RGBA. Attached are two images that appear to be the same; however, one is in P and the other is in RGBA. The reason that this is a problem is because I use a python script to manipulate images, and the python image library used crashes when it encounters an image in P format, meaning I have to use another python script to convert my images from P to RGBA first. Is there some way to fix this so images are output in RGBA? I looked through the settings, but I couldn't find anything. In case anyone else is having this problem and wants the fix I'm using, here's the script that converts from P to RGBA:

 

from PIL import Image

# Open the image in "P" mode
img = Image.open('image_p.png')

# Convert the image to "RGBA" mode
img_rgba = img.convert('RGBA')

# Save the converted image
img_rgba.save('image_rgba.png')

image_p.png

image_rgba.png

Edited by IncandescenceSy
Typo
Link to comment
Share on other sites

35 minutes ago, IncandescenceSy said:

Is there some way to fix this so images are output in RGBA?

 

Change the Bit Depth from Auto-detect to 32-bit in the PNG save dialog.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

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.

×
×
  • Create New...