First I want to say sorry for my bad english (I speak and write spanish)
I am working in a program written by me in VB6, which load a image file (JPEG) and looks in every pixel of it to take the RGB component of each one of them, to compare one user given color with the pixels of the image to count them. At the end, I need to save the image in JPEG (which I modify the width and height) with a new name in a new location.
To do that, I need to put the image info (pixel info) in a array like this:
type tRGB ' Type used to store the RGB components of a pixel R as byte G as byte B as byte end type ' Two dimensional array to store the pixels in RGB components dim aImageArray(lImageWidth, lImageHeight) as tRGB
... then I get into the array to compare the color given with every position of the two dimensional array.
The questions are:
- How can I load the color information of the image in such array?
- How can I resize the image (in most cases, the digital images are really big)?
- How can I save the array in a new JPEG image?
Note: I have already take a look at the article in vbAccelerator http://www.vbaccelerator.com/home/VB/Code/vbMedia/Saving_Pictures_to_JPG/Using_Intel_JPG_Library/article.asp where the author explains how to do something like the thing I need. The problem is that he use a DLL from Intel Corp. (IJL.DLL) which I dont want to use. I need something that Windows (9x, 2k or XP) can bring me by itself.
I have a testing working version using this aproach which runs perfect. But again, I dont want to use DLL's from others than Windows.
Sorry for the long of this post and for my bad english.
Thanks for your interest, and please, if you can, help me.