Tech . January 5, 2010
    . por Development Team

    Get size of image without loading in to memory

    The simplest way is to read the image header (metadata). Our open source project Photoshop Framework recently implemented a function that performs this task in a very simple way.

    See this post in stackoverflow to see the code for this function specifically and other useful information.

    This function is implemented only for PNG images. Not yet implemented for other image formats, developers are welcome. The project is Open Source under the GNU License.

    Note: This function doesn’t work with iPhone compressed PNGs, this compression is automatically performed by XCode and change the image header, see more details here and how to disable this feature: http://discussions.apple.com/thread.jspa?threadID=1751896

    Future versions of PSFramework will interpret this headers too, stay tuned.

    Comparta este artículo
    • Facebook
    • Mixx
    • Google Bookmarks
    • LinkedIn
    • Print
    • email
    • Twitter

Comente este articulo

Enviar
Hidden.