ImageMagick convert inputfilename not working

   2813   6   0
User Avatar
Member
155 posts
Joined: 11月 2015
Offline
I made a PDG Image Convert Setup in 18




In 18.5 the imagemagick node in tops changed.





The convert mode doesn't have an “Output Filename” but now has an “Output File Path”
and it seems the {inputfilename} variable doens't do it's job any longer

instead it creates files with literally {inputfilename} as the filename and with multiple files overwrites each one with the next one

I just tried my setup and it still works in H18.

Is there some new workflow with this node I am not aware of or is it a bug?
Edited by chf - 2020年10月23日 08:17:58

Attachments:
H18.JPG (29.6 KB)
H18_5.JPG (23.1 KB)

User Avatar
スタッフ
387 posts
Joined: 8月 2017
Offline
This syntax has been removed in the updated ImageMagick node for clarity and consistency with the rest of PDG. The recommended workflow now is to use regular PDG attributes. For this case, I would feed the input file into a File Pattern node with the “Extension in Filename Attribute” disabled (and setting the Pattern parameter to @pdg_input), and then wire the File Pattern into the ImageMagick node. You'll then be able to replace “{inputfilename}” with the @filename attribute.

I will add a note to the documentation about upgrading a scene from the 18.0 ImageMagick node to the 18.5 ImageMagick node.
Edited by BrookeA - 2020年10月23日 09:57:28
User Avatar
Member
155 posts
Joined: 11月 2015
Offline
ok thanks

thing is I generate my work items with the file pattern node
the pattern set to a directory
$work/`chs("../../settings/file")`/*.png
to find every image file in that directory

how would I implement this with the pattern parameter set to @pdg_input ?
User Avatar
スタッフ
387 posts
Joined: 8月 2017
Offline
If you're already using File Pattern to generate your work items, you shouldn't need anything additional. You'll just need to disable the “Extension in Filename Attribute” parameter.
User Avatar
Member
155 posts
Joined: 11月 2015
Offline
BrandonA
If you're already using File Pattern to generate your work items, you shouldn't need anything additional. You'll just need to disable the “Extension in Filename Attribute” parameter.

I still get @filename.png overwriting itself until all images are exported

Must be missing something here..

Attachments:
imageMagick_filepattern.JPG (39.8 KB)
imageMagick_filename.JPG (76.6 KB)

User Avatar
スタッフ
387 posts
Joined: 8月 2017
Offline
@filename is an expression, so it is required to use backticks (`) around it.
User Avatar
Member
155 posts
Joined: 11月 2015
Offline
BrandonA
@filename is an expression, so it is required to use backticks (`) around it.

  • Quick Links