Page 1 of 1

Resizing raw byte array?

Posted: 2018-04-12T13:39:33-07:00
by i73
I'm currently exporting my images in raw byte array data, 0-255. Is there a way I could resize this (With the width, height and stride) or would I have to convert it to a bitmap then run it through IM? Would I also be able to convert it with IM? Then resize?

Re: Resizing raw byte array?

Posted: 2018-04-12T17:12:15-07:00
by snibgo
IM contains no facilities that will resize an image that is contained in your array, because IM knows nothing about the structure of your data.

However, you can convert that data into an IM "Image" data structure, then do whatever IM operations you want such as resize, then convert it back.

See pixel.h ImportImagePixels() and ExportImagePixels().