?
Solved

Open gif and save it too

Posted on 2000-03-22
4
Medium Priority
?
138 Views
Last Modified: 2013-11-19
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
Comment
Question by:Jens979
[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
  • 3
4 Comments
 
LVL 32

Expert Comment

by:Erick37
ID: 2647736
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
 
LVL 32

Expert Comment

by:Erick37
ID: 2647748
If you just want to change the filename use:

Name c:\old.gif As c:\new.gif
0
 
LVL 32

Accepted Solution

by:
Erick37 earned 140 total points
ID: 2647750
Make that

Name "c:\old.gif" As "c:\new.gif"
0
 

Author Comment

by:Jens979
ID: 2670414
oh yea, ofcource; rename it :-))

Thank you!

/Jens*
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

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…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Learn how to set up basic frames and paths in Prezi and understand the open space that Prezi allows you to create presentations in.
In addition to being a great web-based presentation tool, Prezi also makes it easy to save your presentation as a PDF to share with others as well. Learn how in this tutorial. Select the share icon from the top menu in your Prezi editor: Select "D…
Suggested Courses
Course of the Month11 days, 9 hours left to enroll

752 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