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 18


Rotate Image.


Rotate image

Rotate.vbs

Dim im
Set im = CreateObject("ActiveImage.Images.1")
im.SetImageType 1
im.ReadFromFile "C:\AI\rose.jpg"
h = im.GetHeight
w = im.GetWidth


im.SetColor 255,255,0

im.CopyImageRotate 1,0,45
im.SetImage 1
im.SetImageType 0
im.WriteToFile "C:\AI\rrose.png"
im.SetImageType 1
im.SetJpegQuality 100
im.WriteToFile "C:\AI\rrose.jpg"
im.SetImageType 4
im.WriteToFile "C:\AI\rrose.bmp"
im.SetImageType 3
'im.ConvertToPalette
im.WriteToFile "C:\AI\rrose.gif"
im.DestroyAll

Set im = Nothing


SimpleRotate.vbs

Dim im
Set im= CreateObject("ActiveImage.Images.1")
im.Setimage 0
im.SetImageType 1
im.ReadFromFile "C:\AI\rose.jpg"

h = im.GetHeight
w = im.GetWidth

im.SetImage 1
im.CreateImage w,h
im.SetColor 255,0,0
im.Fill 0,0

im.CopyImageSimpleRotate 1,0,w/2,h/2,0,0,w,h,-0
im.SetImageType 1
im.SetJpegQuality 90
im.WriteToFile "C:\AI\simplerotate.jpg"
im.DestroyImage

Set im = Nothing



 rrose.jpg
 Picture 1. rrose.jpg (size - 10 Kb) Picture 2. simplerotate.jpg (size - 11 Kb)

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.