Solved

Open gif and save it too

Posted on 2000-03-22
4
133 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Add visuals to your Prezi to keep your audience engaged. Learn how to embed images, edit them, and more in this video micro tutorial. Select "Insert" from the top menu in your Prezi editor: Select "Image": A toolbar will pop in from the right …

785 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