| Welcome, Guest |
You have to register before you can post on our site.
|
| Latest Threads |
GIMP 3.0.6 only uses a fe...
Forum: General questions
Last Post: rich2005
Yesterday, 12:09 PM
» Replies: 2
» Views: 211
|
GIMP 3 script-fu not load...
Forum: Scripting questions
Last Post: Ofnuts
Yesterday, 09:12 AM
» Replies: 1
» Views: 128
|
What exactly tutorials ar...
Forum: General questions
Last Post: SleipnirTheHorse
12-04-2025, 05:35 PM
» Replies: 7
» Views: 849
|
Déformation par "Cage"
Forum: General questions
Last Post: rich2005
12-04-2025, 09:27 AM
» Replies: 7
» Views: 396
|
Average colour in GIMP - ...
Forum: Extending the GIMP
Last Post: Ofnuts
12-02-2025, 08:57 PM
» Replies: 5
» Views: 372
|
Plugins with Gimp 3.2 RC1...
Forum: General questions
Last Post: rich2005
12-02-2025, 08:10 PM
» Replies: 1
» Views: 224
|
Isse with applying Layer ...
Forum: General questions
Last Post: rich2005
12-02-2025, 08:21 AM
» Replies: 1
» Views: 190
|
Batcher - Batch Image Pro...
Forum: Extending the GIMP
Last Post: chuckhenrich
12-01-2025, 10:51 AM
» Replies: 7
» Views: 8,574
|
plugin-py3-export-all
Forum: Extending the GIMP
Last Post: Ofnuts
12-01-2025, 08:19 AM
» Replies: 6
» Views: 515
|
pencil don't have full co...
Forum: General questions
Last Post: rich2005
11-30-2025, 08:03 PM
» Replies: 4
» Views: 3,512
|
|
|
| python-fu pdb.file_exr_save issue |
|
Posted by: JBreckeen - 05-01-2024, 03:12 PM - Forum: Scripting questions
- No Replies
|
 |
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.
|
|
|
| Currently Active Image |
|
Posted by: JBreckeen - 05-01-2024, 02:54 PM - Forum: Scripting questions
- Replies (6)
|
 |
Hello all.
So I have searched and found some info saying this may not be able to be done, but I would really like a way to infer the currently-viewed image in python-fu.
I need this since I have a plugin (think of it more as an extension in other software), that communicates with Gimp from outside. Mostly is handles loading, saving, and exporting of image files to our pipeline. Right now I just use:
currentImage = gimp.image_list()[0]
currentDrawable = pdb.gimp_image_get_active_layer(currentImage)
which works if there is either one image file open, or want to deal with the last opened. But would really prefer to be able to have it work on whatever image is "active". I have read there is nothing in the API that deals with the active, but are there any work-arounds?
Is there something that I am missing?
Thanks in advance,
J.
|
|
|
| creases |
|
Posted by: novalore40 - 04-27-2024, 12:35 AM - Forum: General questions
- Replies (13)
|
 |
I have always used an older version of gimp like 2.8 or something like that i just upgraded to 2.10.36. now this is my problem i make clothes for sims and i always used the bump map when doing this in 2.8...I did this by adding a new transparent layer putting the creases in white on that layer and then go to where i want the creases to be on the main colored layer and opening up bump map and clicking on the crease layer so it would bump map it to the colored layer. pretty easy and straight forward now my problem is i go to do that in the new gimp and i get nada nothing ect, i have looked for tutorials that explain how to do this but find none. can anyone help ty in advance
|
|
|
| Scaling an image to a fixed file size |
|
Posted by: julescousins - 04-24-2024, 10:07 AM - Forum: General questions
- Replies (4)
|
 |
Hi there, newbie here.
I am a very basic user, doing simple, repetitive tasks, which typically involve cropping an image to a rectangular aspect ratio of 1.308:1 but to different pixel sizes. The online service the pictures are intended for has a maximum file size of 187kb per image, so I then scale my images, which are of different file sizes (so I can't use a default percentage scale), possibly 2 or 3 times until it is just under 187kb.
Is there an easier way to scale my cropped image to a fixed file size?
Many thanks,
Jules.
|
|
|
|