pngpp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pngpp-devel] Iplimage to png


From: Alex Shulgin
Subject: Re: [pngpp-devel] Iplimage to png
Date: Thu, 24 May 2012 20:54:28 +0300

On Thu, May 24, 2012 at 8:46 PM, Ahmed D. Hunzai <address@hidden> wrote:
> Hello!
>
> I need to convert IplImage to png . My Iplimage is as fallow:
>
> IplImage *imgl=cvCreateImage(cvSize(ww, hh), 8, 3);
>
> I need image in png::gray_pixel. please help me how to convert.

Hello,

Is this Iplimage OpenCV or something?  What have you tried and how did
that fail?

Basically you'll need to iterate over pixels (or rows) in your
existing image representation, copying the data into a
png::image<png::gray_pixel> object (performing color space conversion
if necessary.)

Other option would be to construct the png::image passing the pixel
buffer managed by your OpenCV image object.  I'm not sure if this is
possible with the current pngpp API though.  Maybe I'll work to add
this API since some people are showing demand for this.

--
Regards,
Alex



reply via email to

[Prev in Thread] Current Thread [Next in Thread]