Hello.
There is a problem with resizing smiles.
Sometimes ResizeWithRatio return an image more big than original.
mydiff:
we check the original width and height size, if widht or height size is more
than 50 we save the original size to calculate a proportion then if widht
(or height) proportion result is minor than 19 we set it (or height) to 19,
as msn does. Then we call: ::picture::Resize $image $width $heigh
Problem:
This two _problem_ are introduced since -r8634
1) If we add a new smile, until when we restart aMSN we will see in
chatwindow the original size...
2) Some resized images have a different background in respect to original
images.
Thanks, bye.
Square87
Index: smileys.tcl
===================================================================
--- smileys.tcl (revision 8657)
+++ smileys.tcl (working copy)
@@ -149,7 +149,22 @@
return
}
if { [image width $image] > 50 || [image height $image] > 50 } {
- ::picture::ResizeWithRatio $image 50 50
+ set width [image width $image]
+ set height [image height $image]
+ if {$width > 50} {
+ set height [format "%0.0f" [expr
((1.0*$height)/$width) * 50]]
+ set width "50"
+ if {$height < 19} {
+ set height "19"
+ }
+ } else {
+ set width [format "%0.0f" [expr
((1.0*$width)/$height) * 50]]
+ set height "50"
+ if {$width < 19} {
+ set width "19"
+ }
+ }
+ ::picture::Resize $image $width $height
}
}
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Amsn-devel mailing list
Amsn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amsn-devel