Page 1 of 1

[SOLVED] Saving Composite Operator in MIFF

Posted: 2018-12-15T23:33:25-07:00
by rodlie
Hi,

MIFF files has

Code: Select all

Compose: Over
when you identify them, is it possible to change it? I want to save a project as MIFF and I need to save the composite operator for later use.

I tried (in Magick++):
Composition operator to be used when composition is implicitly used (such as for image flattening).

Code: Select all

image.compose(...)
But that is not saved in the MIFF.

The project is just a bunch of images layered on top with various offset and composite operators, very basic stuff.

Re: Saving Composite Operator in MIFF

Posted: 2018-12-16T01:29:15-07:00
by fmw42
Please, always provide your IM version and platform when asking questions, since syntax may differ.

Also provide your exact command line and your images, if possible.

See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620

If using Imagemagick 7, then see http://imagemagick.org/script/porting.php#cli


For novices, see

http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
https://imagemagick.org/script/porting.php#cli

Re: Saving Composite Operator in MIFF

Posted: 2018-12-16T12:07:58-07:00
by rodlie
6.9.10-16 Q16HDRI Linux.

Command: set compose operator (not "Over") on a image, save as MIFF, run identify and check "Compose: XXX".

My question is: If I set the compose operator on an image can I expect that info to be saved in the MIFF?


Btw, I have already added custom attr to workaround this, I just wanted to know why the image contains a "Compose" option but it's always "Over".

Re: Saving Composite Operator in MIFF

Posted: 2018-12-16T12:47:45-07:00
by snibgo
At the command line, saving as miff also saved the current setting of "-compose". This meant that after reading a miff, "-composite" without explicitly setting "-compose" was risky.

That no longer seems to be the case. I don't know if using a composite setting in an API ever set the "compose" metadata. I doubt if it did, because the API didn't use that metadata.

Yes, custom attributes are a solution to this.

Re: Saving Composite Operator in MIFF

Posted: 2018-12-16T13:32:43-07:00
by rodlie
Thanks for the information, will use custom attributes.