Does decoding jpeg images uncompresses them?
Image processing is mostly done on frames. The digital image frame is a rectangular raster of pixels, either in an RGB color space or a color space such as YCbCr. So, as you noticed, you can be sure that your compressed images are decoded to rectangular rasters in your application. Each encoded image file stores with its data the source bitmap size (width and height) and the source color space (pixel format and bitness). When decoding, these parameters are restored. So, irrespective of what lossless/lossy algorithms are used, the sizes (in bytes) of recovered raster rectangles are identical, if both lo-res and hi-res compressed image files are received by encoding the same source bitmap data.
EDIT: A &quot;multiresolution&quot; comment fairly corrects my answer, and there is the other explanation why the application may not allocate in CPU memory the entire memory occupied by a source raster: a decoder can use GPU memory. But OP notices that decompressed images take &quot;pretty much the same amount of space in memory&quot; irrespective of encoded image quality. Even with multiresolution, the application can decode the image to source dimensions. Also, code performance dependence on image quality is not part of the question.
Still, the &quot;multiresolution&quot; comment is absolutely necessary for completeness.