iNET Interactive - Online Advertising Agency
          
Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Knowledge Base > Code Library > Load or Save PNG/TIFF/JPG/GIF/BMP images using GDI+


Reply
 
Thread Tools Display Modes
  #1  
Old 05-10-2003, 11:46 AM
OnErr0r's Avatar
OnErr0r OnErr0r is offline
Obsessive OPtimizer
Administrator
* Guru *
 
Join Date: Jun 2002
Location: Debug Window
Posts: 13,073
Default Save picturebox to PNG/GIF/JPG/TIF using GDI+

GDI+ while usually used in .net applications, is also available to VB5/6 using declares or a type library.

This sample application shows how to use GDI+ to save images to various compressed image formats.

If you have the gdiplus.dll installed in your \windows(winnt)\system(32) directory, then you can use this code. If not its available at:

http://www.microsoft.com/downloads/d...displaylang=en

Any 32 bit OS aside from Win95 can use the gdiplus.dll, making it an excellent FREE alternative to image controls when saving to compressed formats.

Note: GIF files are covered by the Unisys patent until June, 20 2003.
Attached Files
File Type: zip GdiPlus.zip (53.0 KB, 3057 views)

Last edited by OnErr0r : 09-14-2004 at 05:58 PM. Reason: Changed GUID to CLSID (previously 808 views)
Reply With Quote
  #2  
Old 06-22-2003, 10:27 AM
OnErr0r's Avatar
OnErr0r OnErr0r is offline
Obsessive OPtimizer
Administrator
* Guru *
 
Join Date: Jun 2002
Location: Debug Window
Posts: 13,073
Default GIF Patent Expires in the U.S.

The United States LZW patent expired on June 20th, 2003.. According to Unisys, the counterpart Canadian patent expires July 7, 2004, the counterpart patents in the United Kingdom, France, Germany and Italy expire June 18, 2004, and the Japanese counterpart patents expire June 20, 2004.

For more information see:

http://lpf.ai.mit.edu/Patents/Gif/Gif.html
Reply With Quote
  #3  
Old 06-24-2003, 03:20 PM
OnErr0r's Avatar
OnErr0r OnErr0r is offline
Obsessive OPtimizer
Administrator
* Guru *
 
Join Date: Jun 2002
Location: Debug Window
Posts: 13,073
Default

I have added support for Loading (in addition to Saving) PNG/TIFF/GIF/JPG/BMP etc. Also some GUI changes were made to resize to the loaded image.
Attached Files
File Type: zip gdiplus2.zip (53.7 KB, 2599 views)

Last edited by OnErr0r : 01-26-2004 at 06:11 PM. Reason: Changed GUID to CLSID (previously 788 views)
Reply With Quote
  #4  
Old 07-23-2003, 09:44 AM
OnErr0r's Avatar
OnErr0r OnErr0r is offline
Obsessive OPtimizer
Administrator
* Guru *
 
Join Date: Jun 2002
Location: Debug Window
Posts: 13,073
Default

See this thread/example for saving to GIF with better quality:

http://www.xtremevbtalk.com/t92821.html
Reply With Quote
  #5  
Old 11-21-2003, 12:47 AM
OnErr0r's Avatar
OnErr0r OnErr0r is offline
Obsessive OPtimizer
Administrator
* Guru *
 
Join Date: Jun 2002
Location: Debug Window
Posts: 13,073
Default

For the most recent GDI+ Type Library, and more GDI+ samples, visit this URL:

http://www.xtremevbtalk.com/t98285.html
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Graphics - Picturebox Contents MarkS API 8 05-11-2004 03:17 AM
Load imageFiles from ListBox to another Form's PictureBox array.Keepin aspect ratio. DaveMustaine General 3 04-22-2003 03:46 AM
Save Picturebox to jpg xmcnuggetx General 21 10-29-2002 01:31 AM
Picturebox save. rowanjl General 2 07-08-2002 03:24 AM
COMMON DIALOG - save, open, filetypes, etc... UseTheMan General 1 05-23-2001 11:08 AM

Advertisement: