Posts: 3
Threads: 0
Joined: Oct 2023
Reputation:
0
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
- Linux
Gimp version: 2.10
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!
Posts: 6,080
Threads: 262
Joined: Oct 2016
Reputation:
542
Operating system(s):
Gimp version: 2.10
10-18-2023, 07:57 PM
(This post was last modified: 10-18-2023, 08:03 PM by Ofnuts.)
(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.
Posts: 3
Threads: 0
Joined: Oct 2023
Reputation:
0
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
- Linux
Gimp version: 2.10
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'.
Posts: 6,080
Threads: 262
Joined: Oct 2016
Reputation:
542
Operating system(s):
Gimp version: 2.10
10-19-2023, 07:23 AM
(This post was last modified: 10-19-2023, 07:25 AM by Ofnuts.)
(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)?
Posts: 3
Threads: 0
Joined: Oct 2023
Reputation:
0
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
- Linux
Gimp version: 2.10
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.
Posts: 6,080
Threads: 262
Joined: Oct 2016
Reputation:
542
Operating system(s):
Gimp version: 2.10
(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.
Posts: 6,080
Threads: 262
Joined: Oct 2016
Reputation:
542
Operating system(s):
Gimp version: 2.10
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.
Posts: 2
Threads: 0
Joined: Dec 2023
Reputation:
0
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
Gimp version: 2.10
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!
Posts: 6,080
Threads: 262
Joined: Oct 2016
Reputation:
542
Operating system(s):
Gimp version: 2.10
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
Posts: 2
Threads: 0
Joined: Dec 2023
Reputation:
0
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
Gimp version: 2.10
Thank you so much! I appreciate that explanation, that will work perfectly.
|