Skip to content

Passing .png encoded as .jpg does not throw error #50

@bsansone

Description

@bsansone

Was sent a .jpg image, needed it .png. When downloading the image from Gmail, set format to All Files:

screen shot 2017-09-12 at 3 38 27 pm

Changed extension from .jpg to .png:

screen shot 2017-09-12 at 3 38 35 pm

Having been passing this file which I assumed to be a .png into gd.openPng(), when the img being passed gets to the next method it's used by img.colorAllocate() received error:
"Cannot read property 'colorAllocate' of null". Took me awhile to come to the conclusion it was originally a .jpg that had its extension changed and gd.openPng() couldn't read it because it wasn't encoded as a .png.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions