Skip to main content
Toto RoToTO
Inspiring
September 7, 2009
Question

Make a png from a pixel data (slice).

  • September 7, 2009
  • 1 reply
  • 3347 views

Hi all,

I would like to know if there is a method in to make a PNG from a pixel data.

My plugin is iterating through raster objects, accessing slices of pixels, and will make pngs of this slices.

in AIImageOptSuite, there is a method to make a Png from an AIArtHandle.

Is there somewhere in a suite, a method to do that from a pixel data?

Any help will be appreciate.

Best regards,

Thomas.

This topic has been closed for replies.

1 reply

A. Patterson
Inspiring
September 11, 2009

I don't know if this is what you mean exactly, but we use the AIRasterizeSuite to rasterize artwork and export it as a PNG. If that's the kind of thing you're talking about I could take a look and see what's involved. I know we have some rather ugly looking blocks of code that do pixel conversion of some sort on the results to get it into a form we can write as a PNG, but its doable.

Toto RoToTO
Inspiring
September 21, 2009
"but we use the AIRasterizeSuite to rasterize artwork and export it as a PNG"

This is what I do. But I've got a issue with embedded raster art.

For the moment this kind of art is re-rasterized, so resolution may be lost.

So, I wish I could access to pixel data of the raster image, and then could transform this into png, to avoid resolution issue.

If you have an anotther solution to fixe this issue, I'll take it too! 

Best regards,

Thomas.

A. Patterson
Inspiring
September 21, 2009

But using the Rasterize suite creates a kRasterArt -- shouldn't it be the same code to pull image data from that result as from an embedded image? I'm guessing its not, or you'd have done that already. I think I'm probably missing a step since I've yet to actually try exporting an existing raster (though I will probably have to before too long!).