Lines Matching full:if
34 if (is_resource($this->image)) {
45 if ($this->extension !== 'jpeg') {
51 if (function_exists('exif_read_data')) {
54 if (!empty($exif['Orientation'])) {
61 if (preg_match('@\x12\x01\x03\x00\x01\x00\x00\x00(.)\x00\x00\x00@', $data, $matches)) {
64 … } else if (preg_match('@\x01\x12\x00\x03\x00\x00\x00\x01\x00(.)\x00\x00@', $data, $matches)) {
80 if ($orientation < 0 || $orientation > 8) {
84 if ($orientation <= 1) {
93 if (in_array($orientation, [3, 4])) {
96 if (in_array($orientation, [5, 6])) {
106 if (in_array($orientation, [2, 5, 7, 4])) {
113 //keep png alpha channel if possible
114 if ($this->extension == 'png' && function_exists('imagesavealpha')) {
150 if ($extension === 'jpg') {
153 if ($extension === '') {
157 if (!function_exists($saver)) {
161 if ($extension == 'jpeg') {
181 if ($info === false) {
190 if (!function_exists($creator)) {
197 if ($image === false) {
216 // create a canvas to copy to, use truecolor if possible (except for gif)
218 if (function_exists('imagecreatetruecolor') && $this->extension != 'gif') {
221 if (!$canvas) {
224 if (!$canvas) {
228 //keep png alpha channel if possible
229 if ($this->extension == 'png' && function_exists('imagesavealpha')) {
234 //keep gif transparent color if possible
235 if ($this->extension == 'gif') {
245 * If no transparency is found or the PHP does not support it, the canvas is filled with white
253 if (!function_exists('imagefill') || !function_exists('imagecolorallocate')) {
258 … if (!function_exists('imagecolorsforindex') || !function_exists('imagecolortransparent')) {
264 if (!$transcolor) {
288 * If widht and height are given, the new size will be fit within this bounding box.
289 * If only one value is given the other is adjusted to match according to the aspect ratio
301 if ($width == 0 && $height == 0) {
305 if (!$height) {
308 } else if (!$width) {
332 if ($dim && substr($dim, -1) == '%') {
354 if ($width == 0 && $height == 0) {
358 if (!$height) {
362 if (!$width) {
371 if ($newRatio >= 1) {
372 if ($newRatio > $oldRatio) {
380 if ($newRatio < $oldRatio) {
410 if (