Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Automated batch xcf layer combining and png exporting
#6
Quote:What's the preferred way to save v2.8 XCFs?
Gimp doc says PNG is lossless here, but when exporting to PNG, Gimp offers a compression slider, defaulting to 9. Is 9 lossless? Or maybe 0?

The Gimp save dialogue has a message at the bottom of its window with information on compatibility.

Most often it is the layer mode which has a default / legacy switch but the Bit depth also comes into play in Image -> Precision Check that 8 bit & perceptual(sRGB) is set.

   

Shame the MacOS IM v7 does not rcognise Gimp 2.10 .xcf  however seems pointless to me to re-save all those .xcf to an earlier format. Export what you have straight to .png   PNG is lossless, the compression slider just applies the degree of compression. Lower compression = faster loading.

Quote: Is there a better way to enforce layer alignment than pre-aligning each layer to a common sized boundary? (I never paid much attention to this, it always just worked right when doing things manually in Gimp.)

I am a great believer in keep things as simple as possible. You can place images in IM using offsets, not sure how well that works with the IM composite command. An alternative is resize the top/mid images to background size using IM in the script.

Edit:
I had a look at offsets for the composite command and not able to find anything slick. Again this is just an example for a single set of files, add your own loops, variables etc. but for a simple linear sequence this:
Make an empty canvas - add the top image with offsets - add the middle image with offsets - combine with the background. Offsets are top-left-corner of an image.

Code:
magick  -size 500x500 canvas:transparent canvas.miff
magick composite   top.xcf -geometry +80+50  canvas.miff  first.miff
magick composite mid.xcf -geometry +70+250 first.miff  second.miff
magick composite  second.miff  back.xcf combined.png
rm *.miff

Still using the .xcf's from yesterday, the .miff files are IM's own format. Maybe ok if all the offsets are the same, if they vary between sets of images then I think your original is still the easiest way. Gets this https://i.imgur.com/kYUfrW1.jpg dotted in the top/mid image sizes
Reply


Messages In This Thread
RE: Automated batch xcf layer combining and png exporting - by rich2005 - 09-06-2021, 07:35 AM

Forum Jump: