Tonec.com Bringing Internet Technology Innovations to Market since 1991
  News Products Outsourcing About Us Contact Us
what's new?what's new? featuresfeatures samplessamples manualmanual downloaddownload buybuy
  Tonec Homepage
ProductsActive Imagesamples

Please view complete list of samples

Sample 23


Converting images from one image format to another.


The sample shows how to convert JPEG images to GIF images. The sample uses new ConvertToPaletteNoAlpha method that allows most accurate color conversion despite decreasing color depth from 4294967296 to 256 colors.

jpgtogif.vbs

Dim im, rs
Set im = CreateObject("ActiveImage.Images.1")
im.SetImageType 1
im.ReadFromFile "C:\AI\rose.jpg"
im.SetImageType 3
im.ConvertToPaletteNoAlpha
im.WriteToFile "C:\AI\noalpha.gif"
im.DestroyImage

Set im = Nothing

 
 Picture 1. rose.jpg (size - 6,3Kb) Picture 1. noalpha.gif(size - 21,4Kb)

Next sample >> 

If you have any questions or bug reports, write to support@tonec.com for technical support.

  TonecPrivacy Policy
  © 1999-2005. Tonec, Inc. All rights reserved.