Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ofn-tiles & ofn-export-layers
#31
I'm having trouble with ofn-export-layers.  Installed fine, but when I run it, I get this:

"
GIMP Message

Calling error for procedure 'gimp-file-save':

Error while exporting '<filename>'. Could not export image.

Export all layers Message

Error while exporting '<filename>'. Could not export image.
"

I am able to export the whole image to that folder as usual via "Export As".

Thanks for any help!
Reply
#32
(10-18-2023, 07:06 PM)snailwhiskers Wrote: I'm having trouble with ofn-export-layers.  Installed fine, but when I run it, I get this:

"
GIMP Message

Calling error for procedure 'gimp-file-save':

Error while exporting '<filename>'. Could not export image.

Export all layers Message

Error while exporting '<filename>'. Could not export image.
"

I am able to export the whole image to that folder as usual via "Export As".

Thanks for any help!

What are the directory and name pattern like in the parameters dialog? In ofn-export-layers I mistakenly left a directory that is likely not on your system, but you can always change it.
Reply
#33
Directory is set manually - I've tried a couple different folders, including Desktop.
Layer name is set to: {name}.png
Hierarchy separator is: -
and Groups to Directories is 'No'.
Reply
#34
(10-18-2023, 11:54 PM)snailwhiskers Wrote: Directory is set manually - I've tried a couple different folders, including Desktop.
Layer name is set to: {name}.png
Hierarchy separator is: -
and Groups to Directories is 'No'.
  • What are the layer names? Any punctuation in these?
  • Is this Windows or Linux (your profile indicates both)?
Reply
#35
I'm on Windows. Layer names have spaces but no punctuation.

But I figured it out! The image mode was Indexed. When I switched it to Grayscale, it works fine.
Reply
#36
(10-19-2023, 05:05 PM)snailwhiskers Wrote: I'm on Windows.  Layer names have spaces but no punctuation.

But I figured it out!  The image mode was Indexed.  When I switched it to Grayscale, it works fine.

Good to know. I will investigate why it it doesn't work.
Reply
#37
Updated ofn-export-layers. Minor changes:
  • Fixed the default directory
  • You can now specify offsetX and offsetY variables in the formatting. Where they come from is left as an exerciser for the reader.
Reply
#38
First I want to say thank you for these plugins, they've been really useful!

I hope I can ask this here - for ofn-export-layers I've recently been using it to create frames for gifmaking in another program. Ideally for this purpose the output images would just be numbered sequentially (starting at 0, but starting at 1 is fine as well) from the bottom-most layer. I've read the linked documentation but I'm pretty lost, embarrassingly. I have very limited programming knowledge and Python isn't included in what I do know. Is there a way to save the exported layer filenames as just sequential numbers? Or numbers inserted before the filename?

Thanks in advance for any help!
Reply
#39
A pattern like {numUp0}.png will export the files as 0.png, 1.png, ... 9.png, 10.png, 11.png ... where 0.png is at the bottom of the layer stack. If you export many layers and want names that will always be sorted right, you can have names padded with 0's on the left using {numUp0:03d}.png that will export the files as 000.png, 001.png, ... 009.png, 010.png, 011.png, ... 099.png, 100.png, 101.png, .....

The :03d means:
  • :: start the format specification
  • 0: pad with zeros to the left
  • 3: make the number 3 characters minimum (without the preceding 0, that would be using spaces). If you have more than 100 layers, better make that a 4.
  • d: use formatting rules for integer numbers
Reply
#40
Thank you so much! I appreciate that explanation, that will work perfectly.
Reply


Forum Jump: