Content of an image

Please think of an image that have some content on the top and nothing on the bottom.
I need to check inside the JPG or a PGN upto which pixel in its height there is content and since which pixel to the bottom of the image all the content is white
Any idea in order to let me start working on coding this ?
I supposed that I have to analize the content of the memory block
Thanks

If you want a device independent version (so you dont have to worry about the internals of how a jpg, png or a.n.other image is stored in memory) , see http://documentation.xojo.com/index.php/RGBSurface specifically the Pixel method.

Thanks Julian… I notice inside the RGBSurface documentation that could be possible to use this function to scan the content of the image from bottom to top and see where there is an horizontal line with a pixel with a color diferent to white, so that will be the bottom content line.
I will work on that… Thanks again.

Beware: if you have troubles with JPEG image, that may be because the image is compacted using the lossy compression.

You’d better use a png image without compression, then when you are happy with the code, try jpeg images (if your really need to do that with jpeg images).

More informations there: WikipediA / JPEG .

Thanks Emile