ProcessNewImage
class ProcessNewImage extends Job implements ShouldQueue
Traits
Properties
int | $tries | The number of times the job may be attempted. |
|
protected bool | $deleteWhenMissingModels | Ignore this job if the image does not exist any more. |
|
Image | $image | The image to process |
|
protected int | $width | The desired thumbnail width. |
|
protected int | $height | The desired thumbnail height. |
|
protected int | $threshold | If the image dimensions exceed this threshold the imag eshould be tiled. |
Methods
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.
Check if an exif array contains GPSImgDirection information.
Check if an exif array contains SubjectArea 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.
Get a Vips image instance for the file.
Details
at line 72
void
__construct(Image $image)
Create a new job instance.
at line 82
void
handle()
Execute the job.
at line 126
protected
makeThumbnail(Image $image, string $path)
Makes a thumbnail for a single image.
at line 150
protected
collectMetadata(Image $image, string $path)
Collect image metadata.
at line 233
protected bool
hasTakenAtInfo(array $exif)
Check if an exif array contains a creation date.
at line 244
protected bool
hasGpsInfo(array $exif)
Check if an exif array contains GPS information.
at line 258
protected bool
hasExtendedGpsInfo(array $exif)
Check if an exif array contains even more GPS information.
at line 270
protected bool
hasGpsImgDirInfo(array $exif)
Check if an exif array contains GPSImgDirection information.
at line 281
protected bool
hasSubjectAreaInfo(array $exif)
Check if an exif array contains SubjectArea information.
at line 293
protected array|bool
getExif(string $path)
Get the exif information of an image if possible.
at line 312
protected float
getGps(array $exifCoord, string $hemi)
Converts a EXIF GPS coordinate to a float see: http://stackoverflow.com/a/2572991/1796523.
at line 329
protected float
fracToFloat(string $frac)
Converts a fracture (string) like "1/2" to a float.
at line 351
protected bool
shouldBeTiled(Image $image)
Determine if an image should be tiled.
at line 373
protected
submitTileJob(Image $image)
Submit a new tile job if the image needs tiling.
at line 388
protected Image
getVipsImage(string $path)
Get a Vips image instance for the file.