Composit multiply gives low quality picture output

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
myoglu
Posts: 6
Joined: 2013-11-25T07:17:49-07:00
Authentication code: 6789

Composit multiply gives low quality picture output

Post by myoglu »

Hi!
This is the command Im using:

composite -compress none -compose Multiply -gravity Center x.tiff Grid-resized-green.tiff out.tiff

The file "Grid-resized-green.tiff" is uncompressed and of high quality, so I can see all pixels as pure green when I zoom in.
The "out.tiff" is both these pictures "merged", BUT now the the pixels from "Grid-resized-green.tiff" is NOT pure green.. Its lighter/darker etc. corresponding to the background picture (x.tiff).

How to fix this, I dont want a lot of different varieties of green, I want PURE green, only one type of green. :)

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

Re: Composit multiply gives low quality picture output

Post by snibgo »

I don't know what "only one type of green" means.

Can you post your input and output files somewhere like dropbox.com and paste the URLs here.
snibgo's IM pages: im.snibgo.com
myoglu
Posts: 6
Joined: 2013-11-25T07:17:49-07:00
Authentication code: 6789

Re: Composit multiply gives low quality picture output

Post by myoglu »

https://www.dropbox.com/sh/gvskkg4gnxvg7hk/eMQYV8mAYI

Does the link work?

One file, with white background is "the correct one". The other is how it looks when merged... Different varieties of green..
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Composit multiply gives low quality picture output

Post by snibgo »

And your input images?
snibgo's IM pages: im.snibgo.com
myoglu
Posts: 6
Joined: 2013-11-25T07:17:49-07:00
Authentication code: 6789

Re: Composit multiply gives low quality picture output

Post by myoglu »

Uploaded now "TVxx.tif" and "grid.tiff"

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

Re: Composit multiply gives low quality picture output

Post by snibgo »

I prefer to use convert rather than composite. In Windows, the equivalent of your command ...

Code: Select all

convert ^
  Tv290.tif ^
  grid.tiff ^
  -depth 16 ^
  -gravity Center ^
  -compose Multiply -composite ^
  out.tiff
... does exactly what I would expect, multiplying the pixels. Where the grid is white, the output is the same as tv290. Where the grid is green, green is multiplied by the tv290 pixel, and the result is different to both.

Note that grid.tiff has two different shades of green. Where lines intersect, the pixel is darker.

I don't know why you are multiplying.

I think (but I'm not sure) that you want to overlay the green pixels over tv290. I'll make the white grid pixels transparent, then place the grid over tv290.

Code: Select all

convert ^
  Tv290.tif ^
  ( grid.tiff -transparent White -write g.png ) ^
  -depth 16 ^
  -gravity Center ^
  -compose Over -composite ^
  out2.tiff
The two shades of green are copied unchanged.
snibgo's IM pages: im.snibgo.com
myoglu
Posts: 6
Joined: 2013-11-25T07:17:49-07:00
Authentication code: 6789

Re: Composit multiply gives low quality picture output

Post by myoglu »

THANK YOU SO MUCH!

That is perfect.
Post Reply