Link to home
Start Free TrialLog in
Avatar of microfleet
microfleet

asked on

Error 481 on valid image - loadpicture

Please download the following image. If you load it into a graphics program like Paint Shop or another commercial software, it works fine, but Visual Basic rejects it, sending a 481 error. Why.

http://www.navigations2000.com/thorses.jpg

I hope someone knows enough about images to be able to examine this file and tell me what is the problem. The reason this file is important is because I want my image viewer to be able to load files that may have some "unloaded" problem.

If it's possible to load this file into a variable then save it as a new image without actually loading it into a picture control, then that would work well I believe. I just don't understand why Visual Basic is rejecting it.


Avatar of microfleet
microfleet

ASKER

Oh yea, to save the file you will probably need to use the SAVE-AS-LINK option from your browser because the browser doesn't want to show the image any more than my program does. I would actually think the file is bad except that all the graphic programs I've used will display it.
 
None of the graphic programs I have will display that file...



Cheers!®©
If you have a program that will read the image and display it, and that program has the capability to save, then resave the file to a new name and see of you still have the same problems with the new file....


Cheers!®©
Oh yea, to save the file you will probably need to use the SAVE-AS-LINK option from your browser because the browser doesn't want to show the image any more than my program does. I would actually think the file is bad except that all the graphic programs I've used will display it.
 
microfleet... Repeating yourself?? ;-)
no, the system must have done that
So did you try saving the image as a new file??


Cheers!®©
Yea I can pull the image info in and store it in a variable, then output it into another file but it's just the same information that I'm putting into the other file. I know if I could get it to load into a picture box then I could save it and it would reformat to work without any problem. But of course the troulbe is getting it to load. I am trying to figure out if I can just get so many bytes from the damaged image and display just that much of it, but I dont know how much of the information to gather from the damaged image. So its gotten very technical I think. Paint Shop Pro and Picture Viewer both display the image without any trouble, so I know the file is viewable, I was just hoping someone knew enough about graphics to understand why.

thanks
Try this:

1) Start "Paint Shop Pro".

2) Open the file thorses.jpg

3) Do a "File->Save As" and save the image as thorses1.jpg

4) Close "Paint Shop Pro".

5) Try using thorses1.jpg in your VB program... It should load into a picturebox with no problem...



Cheers!®©
mcrider, yes that will work just fine but I'm not trying to get Paint Shop Pro to read the image, it does that well enough. I'm trying to figure out why Visual Basic won't read it. Loading it into another program and repairing the image is not going to help my program if it encounters another image that acts this same way. I am trying to figure out how to get Visual Basic to load the damaged file, in some way. If I fix the file first, then that is defeating the purpose.
But thanks anyway
Take a look at the "fixed" file and compare the header against the file that will not load. There has to be some kind of variation... For example, the picture was created using MAC instead of PC and still has the MAC header...

For header information, check out the site: http://wotsit.org/ and do a search for "jpg".



Cheers!®©
mcrider, make that an answer. The information has got me making a viewer for jpg. With that I can attempt to reconstruct the bytes as they are put into a variable. It may and may not work but I think I might be able to get a good resemblence to the original image.
ASKER CERTIFIED SOLUTION
Avatar of mcrider
mcrider

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the points! Glad I could help!


Cheers!®©