简体   繁体   中英

Easeljs: When loading image on to easeljs bitmap class, does it use original image?

I am using Easeljs on my website. I tried to load the image on a bitmap object from CreateJS.bitmap. Since i am not using the full size image, if i scaled the bitmap, will it downsample the original image accordingly.

There is no down-sampling of the actual image, but the pixels that are laid down on the Canvas would be effectively down-sampled.

To actually down-sample the source image, you could scale an EaselJS Bitmap, then retrieve the canvas as an image using stage.toDataUrl() . This returns an image that could be used elsewhere.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM