| Author |
How to image resize with img-jpeg extension ?
|
|
|
| Hello,
Is there a way to resize a JPEG image with the img-jpeg extension ?
Thank you for the help,
Sean - HeliHobby.com
| |
| Roy Terry 2005-02-20, 3:58 pm |
| <born2net@sbcglobal.net> wrote in message
news:PcLRd.1365$Pz7.451@newssvr13.news.prodigy.com...
> Hello,
>
> Is there a way to resize a JPEG image with the img-jpeg extension ?
You can resize during an image copy like this
package require Tk
package require Img
set i1 [image create photo -file x.jpeg]
set i2 [image create photo]
$i2 copy $i1 -subsample 2
### $i2 now contains an image of 1/2
### dimension of the original
See the photo image page for
more details. There is a -zoom for
making images larger.
If you want non-integer resizing or
better pixel "averaging" on the resize
operations then check the
Tcl Wiki pages such as
http://mini.net/tcl/11924
or
http://mini.net/tcl/8448
http://mini.net/tcl/10504
and similar others on the wiki.
Roy
>
> Thank you for the help,
>
> Sean - HeliHobby.com
>
>
| |
|
| Perfect ...
Now if I can only figure out a way to stop "packa req Img" from complaining
when I run it since I am running it in a shell and I am not running
X-Windows on that server ...
Any tips there ?
Thank you for the help,
Sean - HeliHobby.com
"Roy Terry" <royterry@earthlink.net> wrote in message
news:JQ0Sd.1424$MY6.533@newsread1.news.pas.earthlink.net...
> <born2net@sbcglobal.net> wrote in message
> news:PcLRd.1365$Pz7.451@newssvr13.news.prodigy.com...
>
> You can resize during an image copy like this
>
> package require Tk
> package require Img
>
> set i1 [image create photo -file x.jpeg]
> set i2 [image create photo]
>
> $i2 copy $i1 -subsample 2
> ### $i2 now contains an image of 1/2
> ### dimension of the original
>
> See the photo image page for
> more details. There is a -zoom for
> making images larger.
>
> If you want non-integer resizing or
> better pixel "averaging" on the resize
> operations then check the
> Tcl Wiki pages such as
>
> http://mini.net/tcl/11924
>
> or
> http://mini.net/tcl/8448
> http://mini.net/tcl/10504
>
> and similar others on the wiki.
>
> Roy
>
>
>
| |
|
| Thank you ...
I will look into those packages ...
Regards,
Sean - www.HeliHobby.com
"Roy Terry" <royterry@earthlink.net> wrote in message
news:JQ0Sd.1424$MY6.533@newsread1.news.pas.earthlink.net...
> <born2net@sbcglobal.net> wrote in message
> news:PcLRd.1365$Pz7.451@newssvr13.news.prodigy.com...
>
> You can resize during an image copy like this
>
> package require Tk
> package require Img
>
> set i1 [image create photo -file x.jpeg]
> set i2 [image create photo]
>
> $i2 copy $i1 -subsample 2
> ### $i2 now contains an image of 1/2
> ### dimension of the original
>
> See the photo image page for
> more details. There is a -zoom for
> making images larger.
>
> If you want non-integer resizing or
> better pixel "averaging" on the resize
> operations then check the
> Tcl Wiki pages such as
>
> http://mini.net/tcl/11924
>
> or
> http://mini.net/tcl/8448
> http://mini.net/tcl/10504
>
> and similar others on the wiki.
>
> Roy
>
>
>
|
|
|
|