Size of Image in RAM

Sannyasin Brahmanathaswami brahma at hindu.org
Wed Feb 8 01:17:54 EST 2017


@ Scott:

That's not what I get if I open this image in Photoshop.  (CC 2017)



575 X 1000 

http://wiki.hindu.org/uploads/img37.jpg


It is a JPEG, but under the mode menu it shows "RGB/8 Bit" and if I look under indexed colors it says "256"  definitely not 16bit (in which case we should see 65536 colors)

So, somehow this IS a JPG that at least reports in PS as 8 bit but shows it is taking 2.17 MB in RAM, which it would if it were 16 bit.

Scott Rossi wrote:

    When I generate an 8 bit indexed color image in Photoshop and look at the Save As menu, JPEG is not an option.  If I instead choose Save for Web which allows saving as JPEG, the resulting image re-opens in Photoshop in RGB (24 bit color) mode.
    
But, and this is interesting: if I save as PNG Photoshop offers the option to change turn off transparency and save as  bit… the resulting images on disk is 1/3 bigger I size  (jpeg,:229K, png:353K)  But the former/jpg opens in photoshop at 2.17MB and not the 8-bit PNG opens at 739K in RAM  

This tends to confirm your theory and Photoshop is miss reporting the bit depth on the jpg (or something!)  … very interesting. the PNG at half the size in RAM is visually indistinquishable from the JPG (at least to my eyes)

http://wiki.hindu.org/uploads/img37.png

So we have a trade off: use 8 bit PNG and pack more data than we have room for in the mobile app package. or optimize really small JPG's on disk that then take up twice the room in RAM!





More information about the use-livecode mailing list