Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 143
  • Last Modified:

Open gif and save it too

Hello experts!

I have a problem with reading a gif image, and save it again, under a different name. Can someone help?

/jens*
thanks!
0
Jens979
Asked:
Jens979
  • 3
1 Solution
 
Erick37Commented:
You can easily rename a file, and open a GIF in a PictureBox contol. However, since the LZW compression used in GIF images is patented, you cannot save a new image in GIF format without licensing the use of the algorithm from UNISYS.

The only graphics save function that comes with VB is SavePicture()

SavePicture:
"If a graphic was loaded from a file to the Picture property of an object, either at design time or at run time, and it’s a bitmap, icon, metafile, or enhanced metafile, it's saved using the same format as the original file. If it is a GIF or JPEG file, it is saved as a bitmap file."
0
 
Erick37Commented:
If you just want to change the filename use:

Name c:\old.gif As c:\new.gif
0
 
Erick37Commented:
Make that

Name "c:\old.gif" As "c:\new.gif"
0
 
Jens979Author Commented:
oh yea, ofcource; rename it :-))

Thank you!

/Jens*
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now