3804 posts
  • Elite Author
  • Author Level 11
  • Trendsetter
  • 7 Years of Membership
+12 more
KrownThemes
says

I just noticed something .. If i load a 800×600 picture with the MovieClipLoader object, and turn “forceSmoothing” on, the picture will look smoother when you resize it to 1200×1000 for example. But if i resize that to 80×60, it looks like crap :D So does the smoothing work only when you increase the size?

Again .. if i create a BitmapData object with the size 800×600 and attach it to a movieclip with “smoothing” on .. the effect is the same.

So basically .. i can’t smooth a picture if i set a size waaay smaller than the real size(about 10%) .. but it looks smoother if i set a size larger than the real one(even for 200%) ..
Anyone any suggestions? I just want to scale some images down to 10%

Thanks,
Ruben.

3868 posts
  • 8 Years of Membership
  • Affiliate Level 5
  • Author Level 5
  • Beta Tester
+10 more
flashjunkie
says

the best bet is to use something like this…

Load the image into your moviclip using the MCL .

Then send that clip to this function (AS2) before doing any resizing to the image.
function smoothImage(from, target) {
    var pixelData = new flash.display.BitmapData(from._width, from._height);
    pixelData.draw(from);
    target.attachBitmap(pixelData,1,true,true);
}

smoothImage(myPicture_mc, myPicture_mc)

:)

8586 posts Community Moderator
  • United Kingdom
  • 7 Years of Membership
  • Moderator
  • Winner
+10 more
MSFX
Moderator
says

its because of the way smoothing works, your essentially blending the values of neighbouring pixels, a very fine blur if your like. If you enlarge the image this is great as you’ll get grosse artifacts otherwise dependant upon the image quality and smoothing will remove them. For reducing the size it doesnt work so well, especially considering when you reduce the size to 10% your deleting every 9/10 rows / cols of pixels… smooothing will just look crap :(

3804 posts
  • Elite Author
  • Author Level 11
  • Trendsetter
  • 7 Years of Membership
+12 more
KrownThemes
says

Thanks FJ, but that is exactly what i’m doing ..

MSFX , i guess you’re right. I thought that this has a way around, but i see now that i’ll have to add a blur like you suggested, or something.

by
by
by
by
by
by