imagecolorat returns the color index (position in the palette) for palette based image or the color value for true color images. imagecreatefromjpeg creates true color images, always. imagecreatefromgif creates always palette based images and imagecreatefrompng creates either palette or true color images as PNG supports both image types.