?
Solved

Error 481 on valid image - loadpicture

Posted on 2000-03-10
14
Medium Priority
?
485 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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 150 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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses

718 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