User Name Password Register
DaniWeb IT Discussion Community
All
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
Join Date: Aug 2006
Location: Argentina
Posts: 51
Reputation: dmf1978 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 7
dmf1978's Avatar
dmf1978 dmf1978 is offline Offline
Junior Poster in Training

Help How to load a JPEG image file, store it in array and then save it

  #1  
Aug 11th, 2006
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:
   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.

--Martin
AddThis Social Bookmark Button
Reply With Quote  

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 5:21 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC