[SOLVED] Saving Composite Operator in MIFF

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
rodlie
Posts: 23
Joined: 2018-12-13T01:41:06-07:00
Authentication code: 1152

[SOLVED] Saving Composite Operator in MIFF

Post 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.
Last edited by rodlie on 2018-12-16T13:33:07-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Saving Composite Operator in MIFF

Post 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
rodlie
Posts: 23
Joined: 2018-12-13T01:41:06-07:00
Authentication code: 1152

Re: Saving Composite Operator in MIFF

Post 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".
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Saving Composite Operator in MIFF

Post 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.
snibgo's IM pages: im.snibgo.com
rodlie
Posts: 23
Joined: 2018-12-13T01:41:06-07:00
Authentication code: 1152

Re: Saving Composite Operator in MIFF

Post by rodlie »

Thanks for the information, will use custom attributes.
Post Reply