Quantcast
Viewing all articles
Browse latest Browse all 4972

What operation costs more - Image loading or image resizing ?

The answer probably depends on what definition of cost is used. For most cases, I imagine that loading a new image is more expensive. If the image provider reads a file from a filesystem, there’s probably at least two context changes, storage I/O, memory allocation, and image format decoding. Resizing might not need anything other than allocating memory and the equivalent of decoding. It might still result in context changes and hitting storage if memory swapping is involved.

Viewing all articles
Browse latest Browse all 4972

Trending Articles