Solved

Error 481 on valid image - loadpicture

Posted on 2000-03-10
14
471 Views
Last Modified: 2008-02-20
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.


0
Comment
Question by:microfleet
  • 8
  • 6
14 Comments
 

Author Comment

by:microfleet
ID: 2603684
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.
 
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2603814
None of the graphic programs I have will display that file...



Cheers!®©
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2603848
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!®©
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:microfleet
ID: 2603868
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.
 
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2603894
microfleet... Repeating yourself?? ;-)
0
 

Author Comment

by:microfleet
ID: 2605908
no, the system must have done that
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2607085
So did you try saving the image as a new file??


Cheers!®©
0
 

Author Comment

by:microfleet
ID: 2608399
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
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2608685
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!®©
0
 

Author Comment

by:microfleet
ID: 2608700
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
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2608883
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!®©
0
 

Author Comment

by:microfleet
ID: 2609109
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.
0
 
LVL 14

Accepted Solution

by:
mcrider earned 50 total points
ID: 2609197
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!®©

0
 
LVL 14

Expert Comment

by:mcrider
ID: 2610331
Thanks for the points! Glad I could help!


Cheers!®©

0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question