ProcessNewImageChunk
class ProcessNewImageChunk extendsJob implementsShouldQueue
Traits
Properties
Collection | $ids | IDs of the images to generate thumbnails for. | |
protectedint | $width | The desired thumbnail width. | |
protectedint | $height | The desired thumbnail height. | |
protectedint | $threshold | If the image dimensions exceed this threshold the imag eshould be tiled. | |
protectedarray | $needsThumbnailCache | Caches if an image needs a new thumbnail. | |
protectedarray | $needsMetadataCache | Caches if an image needs a check for metadata. |
Methods
Create a new job instance.
Execute the job.
Check if an exif array contains a creation date.
Check if an exif array contains GPS information.
Check if an exif array contains even more GPS information.
Get the exif information of an image if possible.
Converts a EXIF GPS coordinate to a float see: http://stackoverflow.com/a/2572991/1796523.
Converts a fracture (string) like "1/2" to a float.
Details
at line73
void
__construct(Collection$ids)
Create a new job instance.
at line85
void
handle()
Execute the job.
at line133
protectedbool
needsProcessing(Image$image)
Determine if an image needs to be processed.
at line145
protectedbool
needsThumbnail(Image$image)
Chack if an image needs a thumbnail.
at line164
protected
makeThumbnail(Image$image,string$path)
Makes a thumbnail for a single image.
at line192
protectedbool
needsMetadata(Image$image)
Chack if an image has missing metadata.
at line214
protected
collectMetadata(Image$image,string$path)
Collect image metadata.
at line295
protectedbool
hasTakenAtInfo(array$exif)
Check if an exif array contains a creation date.
at line306
protectedbool
hasGpsInfo(array$exif)
Check if an exif array contains GPS information.
at line320
protectedbool
hasExtendedGpsInfo(array$exif)
Check if an exif array contains even more GPS information.
at line333
protectedarray|bool
getExif(string$path)
Get the exif information of an image if possible.
at line352
protectedfloat
getGps(array$exifCoord,string$hemi)
Converts a EXIF GPS coordinate to a float see: http://stackoverflow.com/a/2572991/1796523.
at line369
protectedfloat
fracToFloat(string$frac)
Converts a fracture (string) like "1/2" to a float.
at line395
protectedbool
shouldBeTiled(Image$image)
Determine if an image should be tiled.