Solved

Open gif and save it too

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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
In this Micro Tutorial viewers will learn the basic shortcuts and functions of Illustrator. The viewer will learn about the paintbrush tool, anchor points, font sizing, and more.
Learn how to use the remote presentation tool in Prezi to allow you to harness the power of this cloud based presentation platform. You can show your presentation with a remote audience using this free tool.

688 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