tile problem after upgrade..

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
dognose
Posts: 265
Joined: 2005-03-08T22:16:37-07:00

tile problem after upgrade..

Post by dognose »

Hi,

I'm wondering what I'm doing wrong here, or what has changed..

I just upgraded from IM 6.4.8 to 6.6 .. and now this command doesn't work. ( It used to color dodge the tiled image on image-in )

composite -compose color_dodge -size "500x500" tile:tile.gif image-in image-out

Is there a better way to do this now?
dognose
Posts: 265
Joined: 2005-03-08T22:16:37-07:00

Re: tile problem after upgrade..

Post by dognose »

Any ideas?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: tile problem after upgrade..

Post by snibgo »

and now this command doesn't work.
What happens instead? Error message? Computer catches fire?

Perhaps you can post sample inputs and expected output.
snibgo's IM pages: im.snibgo.com
dognose
Posts: 265
Joined: 2005-03-08T22:16:37-07:00

Re: tile problem after upgrade..

Post by dognose »

Well, the image-out is the same as the image-in

I guess the problem is with the "-size "500x500" tile:tile.gif" .. it's not making the tiled image.

If i make that image before hand, it works..
convert -size "500x500" tile:tile.gif tiled-in.gif
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: tile problem after upgrade..

Post by snibgo »

Hmm. I don't use composite much, so don't know if it has changed. The equivalent "convert" seems to work fine:

Code: Select all

convert image-in -size "500x500" tile:tile.gif -compose color_dodge image-out
snibgo's IM pages: im.snibgo.com
dognose
Posts: 265
Joined: 2005-03-08T22:16:37-07:00

Re: tile problem after upgrade..

Post by dognose »

That animates the image for me.. instead of composing it.
dognose
Posts: 265
Joined: 2005-03-08T22:16:37-07:00

Re: tile problem after upgrade..

Post by dognose »

hmm. well, it works if I change the command line order. .

composite -size "500x500" tile:tile.gif image-in -compose color_dodge image-out
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: tile problem after upgrade..

Post by snibgo »

Sorry, I forgot the magic work "composite":

Code: Select all

convert image-in -size "500x500" tile:tile.gif -compose color_dodge -composite image-out
To make "convert ... composite" give the same effect as the "composite" command, you need to reverse the order of the two inputs.
snibgo's IM pages: im.snibgo.com
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: tile problem after upgrade..

Post by anthony »

snibgo wrote:Sorry, I forgot the magic work "composite":

Code: Select all

convert image-in -size "500x500" tile:tile.gif -compose color_dodge -composite image-out
To make "convert ... composite" give the same effect as the "composite" command, you need to reverse the order of the two inputs.
That is correct, the order is

Code: Select all

   composite   [color=#800080]source[/color] [color=#800080]background[/color]  -compose [color=#800080]method[/color]  [color=#800080]result[/color]

  convert [color=#800080]background[/color]  [color=#800080]source[/color]  -compose [color=#800080]method[/color] -composite [color=#800080]result[/color]
The reason for this is that "composite" only deals with one thing, so images are given in the order the 'method' refers to. For example: source OVER background

However "convert" is designed to in a more practical handling. you generate you background first, then overlay each source image onto that background. As such the order is reversed.

That same order is the order in which a layering operators like -flatten, -mosaic and -layers merge work.
The 'back' or 'lowest' image is given first, followed by the 'upper' images that are 'higher' in the image stack.


ASIDE: the ONLy thing that "composite" can do that "convert" can not do is 'tiling' the source image over the whole background image. (The "composite" -tile option) :-(
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply