Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python-fu pdb.file_exr_save issue
#1
Hello again, so I have maybe an odd one.

Does anybody know if there are issues with .png's saved with the python pdb.file_png_save()?  In my plugin, any image I "save" using that has issues opening on some viewers, while the same image exported through Gimp's UI using the same settings works perfectly fine.

As a test, I have a simple white image.  If I export it as a .png (16b RGBA) through the UI, works fine everywhere.  But same .xcf saved with this code
Code:
def savePNG(image=None,
           drawable=None,
           filePath=None,
           interlace=0,
           compression=5,
           bkgd=1,
           gama=0,
           offs=0,
           phys=0,
           time=0,
           comment=0,
           svtrans=1
           ):

   try:
       pdb.file_png_save2(image,
                       drawable,
                       filePath,
                       filePath,
                       interlace,
                       compression,
                       bkgd,
                       gama,
                       offs,
                       phys,
                       time,
                       comment,
                       svtrans)

       return True

   except Exception as e:
       log.warning("ERROR:  ", e)
       return False

has the issue.  Keep in mind all the variables get their values set from outside, and it does not seem to matter what options are selected - it always has the problem.

The "bad" .png works in:  Gimp, Photoshop, Blender, Maya, OpenRV, win10 Photos, Paint, Darktable - and probably plenty of otherss.
But it does NOT work in DJV, or ColorSync viewers (and maybe others). Which of course is what we normally use and need.

When I have looked at the image details in RV, both files appear the same.

BTW I also tried pdb.file_png_save() as well

So, has anybody seen differences? 

Thanks much,

J.

AH!!!!!   Nevermind to all of that.  I found the issue:

I stupidly overlooked the bool vs binary problem:  True/False vs 0/1.


Doh!

Sorry for the interruption.

J.
Reply


Messages In This Thread
python-fu pdb.file_exr_save issue - by JBreckeen - 05-01-2024, 03:12 PM

Forum Jump: