Code

Programming Languages: Perl, C++, C

License: MIT License

Show:

What's happening?

  • Convert transparent PNG to JPG color issue

    Hi, i am trying to convert transparent PNG to JPG. I always end up with JPG with black background. I tried things like: * convert -background white * convert +matte -background white * mogrify -set matte false -set background white The last one tried on PNG file before the actual conversion. I used IM in the past and there is a way to convert to white background using...

    2009-11-19 10:43:22 UTC by jotte

  • Followup: RE: resize performance

    How could I use the ThumbNailImage function (or something similar) from the command line? I've previously used **-thumbnail** with ImageMagick, but alas that command does not exist for GM. Is there a tutorial or guide for using functions that only exist at the C code level?.

    2009-11-17 23:21:26 UTC by pmsaue0

  • Followup: RE: Fastest way to (de)serialize() Image?

    It is true that a memory copy is done into freshly allocated space. There is also the option of using the default Blob constructor and then using the updateNoCopy() method. If you use this approach, then you are handing responsibility for the pointer to the Blob, and the allocation will be freed when the Blob is destroyed. However, unless you are using a quite weak CPU, I expect that most...

    2009-11-13 19:32:47 UTC by bfriesen

  • Fastest way to (de)serialize() Image?

    Hi all, I am wondering, what is the fastest way to serialize current Magick::Image. Need would be to obtain jpg from a web cam, do some simple image manipulation to it and then resend the manipulated image via tcp/ip. Currently for realtime (15fps, 640x480 colour jpg) processing using Blob is too slow. I.e. I'm doing things like this: Magick::Blob blob(rawJpg.data(), rawJpg.dataSize());...

    2009-11-13 12:43:18 UTC by vartiain

  • Followup: RE: GM and IM compatability

    Looks like your fixes for (1) and (3) work in the 20091110 snapshot make GM work like IM does. I didn't do any thorough testing. I only tested output and input of an image with a map of "RGBA". Thanks for getting it fixed quickly! I agree with the approach that you describe regarding gamma. My point is that IM provides a mechanism which can apply the gamma or inverse gamma to an entire...

    2009-11-12 04:28:14 UTC by skuhl

  • Followup: RE: GM and IM compatability

    The easiest approach is to generate the image in gamma-corrected space, and then adjust the gamma based on the inverse of the current gamma. Then the result will be linear-light rather than intensity. It would be handy to have a function which does this for single color values.

    2009-11-11 21:43:45 UTC by bfriesen

  • Followup: RE: GM and IM compatability

    Again, I agree. A 1/2 value would appear to be about 1/2 brightness to an observer. But, human perception of brightness is not linear. If you want something to actually be 50% intensity (as in the physical amount of light coming off of the monitor---taking the human out of the equation), a value of .5 does not produce 50% intensity.

    2009-11-11 20:59:38 UTC by skuhl

  • Followup: RE: GM and IM compatability

    Actually, the gamma in sRGB, Rec.601, and Rec.709 attempts to make the data linear in terms of intensity. So a 1/2 value should indeed be 1/2 as bright to the observer.

    2009-11-11 18:17:33 UTC by bfriesen

  • Followup: RE: GM and IM compatability

    Ok. I will try it out when I get a chance. I'm not disputing what you are stating regarding RGB/sRGB. I agree that an image which was created for an sRGB display does not require any changes to be displayed on an sRGB display. My point is simply this: What if you want to create a synthetic solid color image which is to be displays as 50% intensity on an sRGB screen? Due to gamma, storing...

    2009-11-11 17:37:03 UTC by skuhl

  • Followup: RE: GM and IM compatability

    Please test the fixes via CVS HEAD or via the GraphicsMagick snapshots. The 1.4.020091110 snapshot should contain the necessary fixes. Ordinary RGB has typically been sRGB since sRGB is an attempt to describe what computer users were already seeing for many years. I am not sure what ImageMagick might be doing with gamma since no changes are required if a sRGB image is displayed on a sRGB...

    2009-11-11 16:53:18 UTC by bfriesen

Our Numbers