actionscript 3 - Scaling down a bitmap makes it look worse? -
I have this in AS3, which means take a screenshot of your webcam and display a timestamp on it
var width = 196; Var Height = 147; Var Screenshot: Bitmapdata = New Bitmapdata (width, height, false); Var overlay: bitmapdata = new bitmap data (90,90, incorrect); Var m: matrix = new matrix (); Var M2: matrix = new matrix (); Var Scale: Number = 1; M.scale (width / (myCam.width), height / (myCam.height)); // scale m2.scale (scale, scale) for thumbnails; // scale overlay.draw (time group, m2) for time; Screenshot.draw (VD1, m); // A 400x300 image screenshot. Merge (overlay, new rectangle (0,0, timreck.width * scale, timeline.height * scale), new point (width- (timercreat width * scale) +1, height- (time -that heat * scale) +1, 256, 256, 256, 256);
Because I deliberately scales a 400x300 image in 196x147, it looks normally worse, but it's trendy.
However, if I see the scale
variable, the overlay
(timestamp) image that I'm merged with screenshots really looks bad.
overlay
scale
is set to 1,
overlay
when scale is set to
.5:
I "quality" without losing that quality How can i keep
< The second, when you scale with the scale factor, you will have some steps may try to scale results (Smooth). Something like (pseudocode): And from the last one, some magic. draw
method in the Fisrt, smoothing
parameter Try to use
Draw (Source: Aibiaitimapdroubl, Matriksः Matrix = null, Rngtansform Flaskjim: Rngtrensform = NULL, Misrnmodः String = null, Klipakar: Rectangle = null, sm thing: Boolean = false): void
Big Imejbeedi = Scale Image (Source Image Bitmapdeta Big Skelfactor, Big_aiamayuenuaianuaiyuenuaianti, Biaiji_aiananuaruaiaciiititi); SmallImageBD = Scale Image (Large ImageBD, Small ScaleFactor, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);
Comments
Post a Comment