•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 397,787 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,420 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser:
Views: 7419 | Replies: 7
Hi
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:
... 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.
--Martin
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 tRGBThe 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.
--Martin
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Visual Basic 4 / 5 / 6 Marketplace
- Python and the JPEG Image File, Part 2, The Image (Python)
- Python and the JPEG Image File, Part 1, The Header (Python)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Import excel file into Starnet
- Next Thread: Reading parallel port in VB6 under winXp



Threaded Mode