Solved

Open gif and save it too

Posted on 2000-03-22
4
135 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
  • 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 35 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this tutorial viewers will learn how to create blended and gradiated shapes in Illustrator using the blend tool Draw two shapes, one of them in a different color: Select both and create a blend by going to Object > Blend > Make: Blends can also b…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

679 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