Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

resize an image

Status
Not open for further replies.

eralper

Programmer
Joined
Feb 12, 2002
Messages
1
Location
TR
hi,
How can I resize width and height of an image using tcl
 
When you create the image you can specify the size:
image create photo i2 -file <yourGIF.gif> -width 12 -height 28
Then, it seems, you're stuck with it unless you create another image of the same GIF with a different size.
Bob Rashkin
rrashkin@csc.com
 
You can zoom, shrink, or clip an image in Tcl by copying it to another image object. The copy operation has several options supporting these features. So, simply create a blank image object as the destination, then perform the appropriate copy operation.

You can find more information about this by reading the &quot;photo&quot; reference page in the Tk distribution. An online version of the reference page is available at (note that it's Tcl/Tk version 8.4beta, but it should be mostly applicable to what you're doing).

You can also get some more tips on manipulating images in Tcl at the Tcl'ers Wiki, Searching for &quot;image&quot; with the URL should get you started. - Ken Jones, President
Avia Training and Consulting
866-TCL-HELP (866-825-4357) US Toll free
415-643-8692 Voice
415-643-8697 Fax
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top