aMSN Forums
February 11, 2012, 08:57:25 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New forum for aMSN !!
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Ugly scaling in avatars?  (Read 7248 times)
trv
Super Power User
**
Offline Offline

Posts: 154


View Profile WWW
« on: January 06, 2008, 06:19:24 pm »

I am not sure if this is a Linux or a general issue, but since i only use linux i post it here.

Its nothing great really, but it would be nice to be fixed.

When you choose a large resolution image for msn avatar, and it has to be scaled down to default 96x96 lets say, then the scaling down is ugly.

When you scale a pic with gimp lets say, or even windows live messenger, the scaled down pic is nice looking. In amsn, there are rough edges etc, bad scaling, or use of a bad library? I dont know..

I can provide screenshots if you'd like.

Im sorry if this has been posted before!
Logged
billiob
Administrator
Super Power User
*****
Offline Offline

Posts: 1352


View Profile
« Reply #1 on: January 06, 2008, 09:01:55 pm »

Use the svn version and recompile amsn librairies.
Logged
Daniel15
Super Power User
**
Offline Offline

Posts: 269


View Profile WWW
« Reply #2 on: January 07, 2008, 06:18:03 am »

The same thing happens for me, even with the SVN version (I'm using an SVN from December though... Has it been changed since then?). I'm guessing it's using linear scaling rather than something like cubic or bicubic, and not smoothing the image or anything

What I usually do is open the image in GIMP, crop it so its aspect ratio is 1:1, resize it to 96x96, then save it. The image looks fine if you do it this way.
Logged

Ubuntu 8.04, Tcl/Tk 8.5, aMSN SVN
My sites: [DanSoft Australia] [Daniel15's Forum and Blog and more...
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9424


View Profile WWW
« Reply #3 on: January 07, 2008, 07:05:17 am »

Daniel: there were some changes in SVN recently, can't remember from when, but I think it was indeed in december. Those changes were in C files, so if you just do an 'svn update' it won't be enough, you'll have to recompile aMSN. We have a few threads talking about this and we use the best method possible, but also it will depend on your image size, if the original image is too big, then we will use a faster but less acurate method for resizing.
Logged

KaKaRoTo
peter
Power user
*
Offline Offline

Posts: 68


View Profile
« Reply #4 on: May 02, 2008, 11:20:58 pm »

Sorry for bringing this issue on, again.

I have the latest svn 9796, and my display picture happens to be shown like this to one of my contacts (the only one that has compaint  Smiley  ), using WLM 8.5.1302.1018

 http://www.postimage.org/Pquas10.jpg



It happens to be a large image (640x480). I've tried with a smaller one and it works well.
I have experienced this, for a while...I can't tell you how long  Smiley
After a svn update... I usally do a recompile just to make sure Smiley

Thank you
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9424


View Profile WWW
« Reply #5 on: May 03, 2008, 02:58:50 am »

maybe the image got corrupted, it's not a bad scaling, the image is just corrupted.. try to recreate your DP.. or maybe upgrade your libpng installation
Logged

KaKaRoTo
peter
Power user
*
Offline Offline

Posts: 68


View Profile
« Reply #6 on: May 03, 2008, 10:20:54 am »

I just think it's a litle odd, because I did a resize my self, using kolourpaint (smooth scale), to less than 96x96px and the result was the same. But with others images I have (smaller than 96x96 ) it works just fine. Smiley Perhaps it's the images I have Smiley

My version of libpng is 1.2.6-2

Thank you.
Logged
lucianolev
Power user
*
Offline Offline

Posts: 56


View Profile
« Reply #7 on: June 23, 2009, 02:15:41 am »

Hi!

I'm using one of the latest SVN (11256) and the scaled version of the picture looks very bad when using a 2MP or larger photo  :? I'd to manually resize the picture to a small size (256x256 for example) in order to get the avatar look nice, which is a quite annoying process.

Any ideas how to solve this issue?
Thanks in advance! Smiley
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9424


View Profile WWW
« Reply #8 on: June 23, 2009, 06:58:15 pm »

Hi,
no there is no solution for this. The algorithms we use depend on the original size, we use a smooth resizing when the picture is small enough (below 800x800), a medium quality resizing for pictures between 800x800 and 1024x1024 and a low quality resize for anything beyond that...
The reason is simple, we don't want amsn to freeze for a long time when doing a very cpu consuming resizing...
Logged

KaKaRoTo
lucianolev
Power user
*
Offline Offline

Posts: 56


View Profile
« Reply #9 on: June 25, 2009, 05:04:26 am »

mmm it's quite strange that it cannot be improved.. why does a simple program like Gwenview resize my 3000x1000 photo to 96x96 smoothly in a fraction of a second and aMSN would freeze for a long time doing the same operation? And what about other messengers? I'm on an Athlon X2 5200 which is far from a high end machine..

Can you tell me in which part of the aMSN's codebase is that resize function? I want to test this out and see if the resize can be improved. The current scaling is just unacceptable for me.

Thanks for your time  Smiley
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9424


View Profile WWW
« Reply #10 on: June 25, 2009, 05:43:16 am »

Well, the library we use may not be as performant as what the other programs use.. You can change it yourself (yeay, open source), look at amsn/utils/TkCximage/src/procs.cpp and search for 'resample' in it.. you'll see an if/else if/else section which checks sizes and decides on the algorithm to use.. just set it all to the same algorithm...
We did upgrade the library which is much more performant, so maybe it's better now.. if you could test it out on resizing huge images (3000x1000 for example) to a good quality and tell us how many seconds or milliseconds it took to do it, that would be awesome! If it's fast enough, we may change it for everyone else too.
thanks.
Logged

KaKaRoTo
lucianolev
Power user
*
Offline Offline

Posts: 56


View Profile
« Reply #11 on: June 30, 2009, 04:08:28 am »

Hi
I've tested the three algorithms and they all seem to perform the same with 2600x2000 photos as regards time. Everyone last like 2-3 secs from when I click the size option to when it's shown resized. I've no way to test this accurately, but I've done test with several photos and different thumb sizes and they all perform the same. It seems that this lag is not related to the resize operation itself but to another task. Also, the size options dialog takes like 2 seconds to show up...

So, I think it's safe and a very good idea to choose the high quality resize for every image since it's the time but the quality is very noticeable. Smiley
Logged
lucianolev
Power user
*
Offline Offline

Posts: 56


View Profile
« Reply #12 on: July 16, 2009, 04:36:40 pm »

Hi sorry to bump, but i'm interested to know what's the resolution about this. Thanks!
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9424


View Profile WWW
« Reply #13 on: July 17, 2009, 03:20:20 pm »

Hi,
no worries.. this was in my TODO list anyways..
so, i've tested with a huge image (4455x1116) and it takes ~30ms with the fastest algorithm, and it takes 200ms with the slowest (bilinear, incredibly huge difference in quality).
considering it's 200ms for such a huge image, noone would notice it, so i do confirm that the new versoin of the library is that much better that it doesn't change much in terms of speed, so I have no switched the algorithm to bilinear so everyone can be happy Smiley
Enjoy!

SVN revision r11347 has the change, don't forget to recompile!
Logged

KaKaRoTo
jaimeduende
Newbie

Offline Offline

Posts: 32



View Profile
« Reply #14 on: July 21, 2009, 01:20:36 am »

Hey there.

I was a poster on the aMSN for Mac forums.

I just wanted to let you know that even though I already updated to SVN 11351, and I don't see a difference in image quality, still the same choppy results.
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!