Re: Trouble with using MagickGetSamplingFactors API
"google" <[email protected]> Wed, 3 Jul 2013 16:44:47 +0800
| Newsgroups | gmane.comp.video.graphicsmagick.apis |
|---|---|
| Message-ID | <[email protected]> |
Thank you so much for your reply.
I had sovled my problem. And I have another problem, when I call MagickStripImage API to strip the image, I got a new image which size was larger than input image's , I can't explain it. (Note: the two images have the sampling factors and quality. )
Pseudo code like this:
1.new MagickWand object;
2.read input image
3.get the sampling factor and quality
4.set the sampling factor and quality
5.call MagickStripImage() to strip the image
6.write to output image.
Thank you a lot once again.
------------------ Original ------------------
From: "Bob Friesenhahn"<[email protected]>;
Date: Mon, Jun 24, 2013 10:05 PM
To: "google"<[email protected]>;
Cc: "graphicsmagick-apis"<[email protected]>;
Subject: Re: [GM-apis] Trouble with using MagickGetSamplingFactors API
On Thu, 20 Jun 2013, google wrote:
> Hi, all:
> I have trouble with using MagickGetSamplingFactors API, I need your help. I call the MagickGetSamplingFactors
> function to get the image samplimg factor, but I always get NULL. How can I get the image samplimg factor? Can you give
> me a example. Thanks you a lot again.
This API retrieves values deposited into the ImageInfo structure,
which is used while saving the image. It won't have a value there
unless you previously set it.
The JPEG reader does produce several key/value attributes based on
the input file:
JPEG-Quality
JPEG-Colorspace
JPEG-Colorspace-Name
JPEG-Sampling-factors
The value you want is accessed via 'JPEG-Sampling-factors', if it is
available.
You should be able to use MagickGetImageAttribute() with a name
argument 'JPEG-Sampling-factors' to retrieve the value string.
Use 'gm identify -verbose file.jpg' to list the attribute information
known for the file.
Other formats do not support sampling factors or use a different
attribute name for it.
Bob
--
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Graphicsmagick-apis mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-apis