Namespaces

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Config
      • Adapters
      • Extensions
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Diagnostics
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
      • PhpGenerator
  • NetteModule
  • none

Classes

  • ArrayHash
  • ArrayList
  • Callback
  • DateTime
  • Environment
  • Framework
  • FreezableObject
  • Image
  • Object
  • ObjectMixin

Interfaces

  • IFreezable

Exceptions

  • ArgumentOutOfRangeException
  • DeprecatedException
  • DirectoryNotFoundException
  • FatalErrorException
  • FileNotFoundException
  • InvalidArgumentException
  • InvalidStateException
  • IOException
  • MemberAccessException
  • NotImplementedException
  • NotSupportedException
  • OutOfRangeException
  • StaticClassException
  • UnexpectedValueException
  • UnknownImageFileException
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  1: <?php
  2: 
  3: /**
  4:  * This file is part of the Nette Framework (http://nette.org)
  5:  * Copyright (c) 2004 David Grudl (http://davidgrudl.com)
  6:  */
  7: 
  8: namespace Nette;
  9: 
 10: use Nette;
 11: 
 12: 
 13: /**
 14:  * Basic manipulation with images.
 15:  *
 16:  * <code>
 17:  * $image = Image::fromFile('nette.jpg');
 18:  * $image->resize(150, 100);
 19:  * $image->sharpen();
 20:  * $image->send();
 21:  * </code>
 22:  *
 23:  * @author     David Grudl
 24:  *
 25:  * @method void alphaBlending(bool $on)
 26:  * @method void antialias(bool $on)
 27:  * @method void arc($x, $y, $w, $h, $s, $e, $color)
 28:  * @method void char($font, $x, $y, $char, $color)
 29:  * @method void charUp($font, $x, $y, $char, $color)
 30:  * @method int colorAllocate($red, $green, $blue)
 31:  * @method int colorAllocateAlpha($red, $green, $blue, $alpha)
 32:  * @method int colorAt($x, $y)
 33:  * @method int colorClosest($red, $green, $blue)
 34:  * @method int colorClosestAlpha($red, $green, $blue, $alpha)
 35:  * @method int colorClosestHWB($red, $green, $blue)
 36:  * @method void colorDeallocate($color)
 37:  * @method int colorExact($red, $green, $blue)
 38:  * @method int colorExactAlpha($red, $green, $blue, $alpha)
 39:  * @method void colorMatch(Image $image2)
 40:  * @method int colorResolve($red, $green, $blue)
 41:  * @method int colorResolveAlpha($red, $green, $blue, $alpha)
 42:  * @method void colorSet($index, $red, $green, $blue)
 43:  * @method array colorsForIndex($index)
 44:  * @method int colorsTotal()
 45:  * @method int colorTransparent([$color])
 46:  * @method void convolution(array $matrix, float $div, float $offset)
 47:  * @method void copy(Image $src, $dstX, $dstY, $srcX, $srcY, $srcW, $srcH)
 48:  * @method void copyMerge(Image $src, $dstX, $dstY, $srcX, $srcY, $srcW, $srcH, $opacity)
 49:  * @method void copyMergeGray(Image $src, $dstX, $dstY, $srcX, $srcY, $srcW, $srcH, $opacity)
 50:  * @method void copyResampled(Image $src, $dstX, $dstY, $srcX, $srcY, $dstW, $dstH, $srcW, $srcH)
 51:  * @method void copyResized(Image $src, $dstX, $dstY, $srcX, $srcY, $dstW, $dstH, $srcW, $srcH)
 52:  * @method void dashedLine($x1, $y1, $x2, $y2, $color)
 53:  * @method void ellipse($cx, $cy, $w, $h, $color)
 54:  * @method void fill($x, $y, $color)
 55:  * @method void filledArc($cx, $cy, $w, $h, $s, $e, $color, $style)
 56:  * @method void filledEllipse($cx, $cy, $w, $h, $color)
 57:  * @method void filledPolygon(array $points, $numPoints, $color)
 58:  * @method void filledRectangle($x1, $y1, $x2, $y2, $color)
 59:  * @method void fillToBorder($x, $y, $border, $color)
 60:  * @method void filter($filtertype [, ...])
 61:  * @method int fontHeight($font)
 62:  * @method int fontWidth($font)
 63:  * @method array ftBBox($size, $angle, string $fontFile, string $text [, array $extrainfo])
 64:  * @method array ftText($size, $angle, $x, $y, $col, string $fontFile, string $text [, array $extrainfo])
 65:  * @method void gammaCorrect(float $inputgamma, float $outputgamma)
 66:  * @method int interlace([$interlace])
 67:  * @method bool isTrueColor()
 68:  * @method void layerEffect($effect)
 69:  * @method void line($x1, $y1, $x2, $y2, $color)
 70:  * @method int loadFont(string $file)
 71:  * @method void paletteCopy(Image $source)
 72:  * @method void polygon(array $points, $numPoints, $color)
 73:  * @method array psBBox(string $text, $font, $size [, $space] [, $tightness] [, float $angle])
 74:  * @method void psEncodeFont($fontIndex, string $encodingfile)
 75:  * @method void psExtendFont($fontIndex, float $extend)
 76:  * @method void psFreeFont($fontindex)
 77:  * @method resource psLoadFont(string $filename)
 78:  * @method void psSlantFont($fontIndex, float $slant)
 79:  * @method array psText(string $text, $font, $size, $color, $backgroundColor, $x, $y [, $space] [, $tightness] [, float $angle] [, $antialiasSteps])
 80:  * @method void rectangle($x1, $y1, $x2, $y2, $col)
 81:  * @method Image rotate(float $angle, $backgroundColor)
 82:  * @method void saveAlpha(bool $saveflag)
 83:  * @method void setBrush(Image $brush)
 84:  * @method void setPixel($x, $y, $color)
 85:  * @method void setStyle(array $style)
 86:  * @method void setThickness($thickness)
 87:  * @method void setTile(Image $tile)
 88:  * @method void string($font, $x, $y, string $s, $col)
 89:  * @method void stringUp($font, $x, $y, string $s, $col)
 90:  * @method void trueColorToPalette(bool $dither, $ncolors)
 91:  * @method array ttfBBox($size, $angle, string $fontfile, string $text)
 92:  * @method array ttfText($size, $angle, $x, $y, $color, string $fontfile, string $text)
 93:  * @method int types()
 94:  * @property-read int $width
 95:  * @property-read int $height
 96:  * @property-read resource $imageResource
 97:  */
 98: class Image extends Object
 99: {
100:     /** {@link resize()} only shrinks images */
101:     const SHRINK_ONLY = 1;
102: 
103:     /** {@link resize()} will ignore aspect ratio */
104:     const STRETCH = 2;
105: 
106:     /** {@link resize()} fits in given area so its dimensions are less than or equal to the required dimensions */
107:     const FIT = 0;
108: 
109:     /** {@link resize()} fills given area so its dimensions are greater than or equal to the required dimensions */
110:     const FILL = 4;
111: 
112:     /** {@link resize()} fills given area exactly */
113:     const EXACT = 8;
114: 
115:     /** @int image types {@link send()} */
116:     const JPEG = IMAGETYPE_JPEG,
117:         PNG = IMAGETYPE_PNG,
118:         GIF = IMAGETYPE_GIF;
119: 
120:     const EMPTY_GIF = "GIF89a\x01\x00\x01\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00!\xf9\x04\x01\x00\x00\x00\x00,\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02D\x01\x00;";
121: 
122:     /** @deprecated */
123:     const ENLARGE = 0;
124: 
125:     /** @var resource */
126:     private $image;
127: 
128: 
129:     /**
130:      * Returns RGB color.
131:      * @param  int  red 0..255
132:      * @param  int  green 0..255
133:      * @param  int  blue 0..255
134:      * @param  int  transparency 0..127
135:      * @return array
136:      */
137:     public static function rgb($red, $green, $blue, $transparency = 0)
138:     {
139:         return array(
140:             'red' => max(0, min(255, (int) $red)),
141:             'green' => max(0, min(255, (int) $green)),
142:             'blue' => max(0, min(255, (int) $blue)),
143:             'alpha' => max(0, min(127, (int) $transparency)),
144:         );
145:     }
146: 
147: 
148:     /**
149:      * Opens image from file.
150:      * @param  string
151:      * @param  mixed  detected image format
152:      * @throws Nette\NotSupportedException if gd extension is not loaded
153:      * @throws UnknownImageFileException if file not found or file type is not known
154:      * @return Image
155:      */
156:     public static function fromFile($file, & $format = NULL)
157:     {
158:         if (!extension_loaded('gd')) {
159:             throw new NotSupportedException('PHP extension GD is not loaded.');
160:         }
161: 
162:         $info = @getimagesize($file); // @ - files smaller than 12 bytes causes read error
163: 
164:         switch ($format = $info[2]) {
165:             case self::JPEG:
166:                 return new static(imagecreatefromjpeg($file));
167: 
168:             case self::PNG:
169:                 return new static(imagecreatefrompng($file));
170: 
171:             case self::GIF:
172:                 return new static(imagecreatefromgif($file));
173: 
174:             default:
175:                 throw new UnknownImageFileException("Unknown image type or file '$file' not found.");
176:         }
177:     }
178: 
179: 
180:     /**
181:      * Get format from the image stream in the string.
182:      * @param  string
183:      * @return mixed  detected image format
184:      */
185:     public static function getFormatFromString($s)
186:     {
187:         $types = array('image/jpeg' => self::JPEG, 'image/gif' => self::GIF, 'image/png' => self::PNG);
188:         $type = Utils\MimeTypeDetector::fromString($s);
189:         return isset($types[$type]) ? $types[$type] : NULL;
190:     }
191: 
192: 
193:     /**
194:      * Create a new image from the image stream in the string.
195:      * @param  string
196:      * @param  mixed  detected image format
197:      * @return Image
198:      */
199:     public static function fromString($s, & $format = NULL)
200:     {
201:         if (!extension_loaded('gd')) {
202:             throw new NotSupportedException('PHP extension GD is not loaded.');
203:         }
204: 
205:         $format = static::getFormatFromString($s);
206: 
207:         return new static(imagecreatefromstring($s));
208:     }
209: 
210: 
211:     /**
212:      * Creates blank image.
213:      * @param  int
214:      * @param  int
215:      * @param  array
216:      * @return Image
217:      */
218:     public static function fromBlank($width, $height, $color = NULL)
219:     {
220:         if (!extension_loaded('gd')) {
221:             throw new NotSupportedException('PHP extension GD is not loaded.');
222:         }
223: 
224:         $width = (int) $width;
225:         $height = (int) $height;
226:         if ($width < 1 || $height < 1) {
227:             throw new InvalidArgumentException('Image width and height must be greater than zero.');
228:         }
229: 
230:         $image = imagecreatetruecolor($width, $height);
231:         if (is_array($color)) {
232:             $color += array('alpha' => 0);
233:             $color = imagecolorallocatealpha($image, $color['red'], $color['green'], $color['blue'], $color['alpha']);
234:             imagealphablending($image, FALSE);
235:             imagefilledrectangle($image, 0, 0, $width - 1, $height - 1, $color);
236:             imagealphablending($image, TRUE);
237:         }
238:         return new static($image);
239:     }
240: 
241: 
242:     /**
243:      * Wraps GD image.
244:      * @param  resource
245:      */
246:     public function __construct($image)
247:     {
248:         $this->setImageResource($image);
249:         imagesavealpha($image, TRUE);
250:     }
251: 
252: 
253:     /**
254:      * Returns image width.
255:      * @return int
256:      */
257:     public function getWidth()
258:     {
259:         return imagesx($this->image);
260:     }
261: 
262: 
263:     /**
264:      * Returns image height.
265:      * @return int
266:      */
267:     public function getHeight()
268:     {
269:         return imagesy($this->image);
270:     }
271: 
272: 
273:     /**
274:      * Sets image resource.
275:      * @param  resource
276:      * @return self
277:      */
278:     protected function setImageResource($image)
279:     {
280:         if (!is_resource($image) || get_resource_type($image) !== 'gd') {
281:             throw new InvalidArgumentException('Image is not valid.');
282:         }
283:         $this->image = $image;
284:         return $this;
285:     }
286: 
287: 
288:     /**
289:      * Returns image GD resource.
290:      * @return resource
291:      */
292:     public function getImageResource()
293:     {
294:         return $this->image;
295:     }
296: 
297: 
298:     /**
299:      * Resizes image.
300:      * @param  mixed  width in pixels or percent
301:      * @param  mixed  height in pixels or percent
302:      * @param  int    flags
303:      * @return self
304:      */
305:     public function resize($width, $height, $flags = self::FIT)
306:     {
307:         if ($flags & self::EXACT) {
308:             return $this->resize($width, $height, self::FILL)->crop('50%', '50%', $width, $height);
309:         }
310: 
311:         list($newWidth, $newHeight) = static::calculateSize($this->getWidth(), $this->getHeight(), $width, $height, $flags);
312: 
313:         if ($newWidth !== $this->getWidth() || $newHeight !== $this->getHeight()) { // resize
314:             $newImage = static::fromBlank($newWidth, $newHeight, self::RGB(0, 0, 0, 127))->getImageResource();
315:             imagecopyresampled(
316:                 $newImage, $this->getImageResource(),
317:                 0, 0, 0, 0,
318:                 $newWidth, $newHeight, $this->getWidth(), $this->getHeight()
319:             );
320:             $this->image = $newImage;
321:         }
322: 
323:         if ($width < 0 || $height < 0) { // flip is processed in two steps for better quality
324:             $newImage = static::fromBlank($newWidth, $newHeight, self::RGB(0, 0, 0, 127))->getImageResource();
325:             imagecopyresampled(
326:                 $newImage, $this->getImageResource(),
327:                 0, 0, $width < 0 ? $newWidth - 1 : 0, $height < 0 ? $newHeight - 1 : 0,
328:                 $newWidth, $newHeight, $width < 0 ? -$newWidth : $newWidth, $height < 0 ? -$newHeight : $newHeight
329:             );
330:             $this->image = $newImage;
331:         }
332:         return $this;
333:     }
334: 
335: 
336:     /**
337:      * Calculates dimensions of resized image.
338:      * @param  mixed  source width
339:      * @param  mixed  source height
340:      * @param  mixed  width in pixels or percent
341:      * @param  mixed  height in pixels or percent
342:      * @param  int    flags
343:      * @return array
344:      */
345:     public static function calculateSize($srcWidth, $srcHeight, $newWidth, $newHeight, $flags = self::FIT)
346:     {
347:         if (substr($newWidth, -1) === '%') {
348:             $newWidth = round($srcWidth / 100 * abs($newWidth));
349:             $percents = TRUE;
350:         } else {
351:             $newWidth = (int) abs($newWidth);
352:         }
353: 
354:         if (substr($newHeight, -1) === '%') {
355:             $newHeight = round($srcHeight / 100 * abs($newHeight));
356:             $flags |= empty($percents) ? 0 : self::STRETCH;
357:         } else {
358:             $newHeight = (int) abs($newHeight);
359:         }
360: 
361:         if ($flags & self::STRETCH) { // non-proportional
362:             if (empty($newWidth) || empty($newHeight)) {
363:                 throw new InvalidArgumentException('For stretching must be both width and height specified.');
364:             }
365: 
366:             if ($flags & self::SHRINK_ONLY) {
367:                 $newWidth = round($srcWidth * min(1, $newWidth / $srcWidth));
368:                 $newHeight = round($srcHeight * min(1, $newHeight / $srcHeight));
369:             }
370: 
371:         } else {  // proportional
372:             if (empty($newWidth) && empty($newHeight)) {
373:                 throw new InvalidArgumentException('At least width or height must be specified.');
374:             }
375: 
376:             $scale = array();
377:             if ($newWidth > 0) { // fit width
378:                 $scale[] = $newWidth / $srcWidth;
379:             }
380: 
381:             if ($newHeight > 0) { // fit height
382:                 $scale[] = $newHeight / $srcHeight;
383:             }
384: 
385:             if ($flags & self::FILL) {
386:                 $scale = array(max($scale));
387:             }
388: 
389:             if ($flags & self::SHRINK_ONLY) {
390:                 $scale[] = 1;
391:             }
392: 
393:             $scale = min($scale);
394:             $newWidth = round($srcWidth * $scale);
395:             $newHeight = round($srcHeight * $scale);
396:         }
397: 
398:         return array(max((int) $newWidth, 1), max((int) $newHeight, 1));
399:     }
400: 
401: 
402:     /**
403:      * Crops image.
404:      * @param  mixed  x-offset in pixels or percent
405:      * @param  mixed  y-offset in pixels or percent
406:      * @param  mixed  width in pixels or percent
407:      * @param  mixed  height in pixels or percent
408:      * @return self
409:      */
410:     public function crop($left, $top, $width, $height)
411:     {
412:         list($left, $top, $width, $height) = static::calculateCutout($this->getWidth(), $this->getHeight(), $left, $top, $width, $height);
413:         $newImage = static::fromBlank($width, $height, self::RGB(0, 0, 0, 127))->getImageResource();
414:         imagecopy($newImage, $this->getImageResource(), 0, 0, $left, $top, $width, $height);
415:         $this->image = $newImage;
416:         return $this;
417:     }
418: 
419: 
420:     /**
421:      * Calculates dimensions of cutout in image.
422:      * @param  mixed  source width
423:      * @param  mixed  source height
424:      * @param  mixed  x-offset in pixels or percent
425:      * @param  mixed  y-offset in pixels or percent
426:      * @param  mixed  width in pixels or percent
427:      * @param  mixed  height in pixels or percent
428:      * @return array
429:      */
430:     public static function calculateCutout($srcWidth, $srcHeight, $left, $top, $newWidth, $newHeight)
431:     {
432:         if (substr($newWidth, -1) === '%') {
433:             $newWidth = round($srcWidth / 100 * $newWidth);
434:         }
435:         if (substr($newHeight, -1) === '%') {
436:             $newHeight = round($srcHeight / 100 * $newHeight);
437:         }
438:         if (substr($left, -1) === '%') {
439:             $left = round(($srcWidth - $newWidth) / 100 * $left);
440:         }
441:         if (substr($top, -1) === '%') {
442:             $top = round(($srcHeight - $newHeight) / 100 * $top);
443:         }
444:         if ($left < 0) {
445:             $newWidth += $left; $left = 0;
446:         }
447:         if ($top < 0) {
448:             $newHeight += $top; $top = 0;
449:         }
450:         $newWidth = min((int) $newWidth, $srcWidth - $left);
451:         $newHeight = min((int) $newHeight, $srcHeight - $top);
452:         return array($left, $top, $newWidth, $newHeight);
453:     }
454: 
455: 
456:     /**
457:      * Sharpen image.
458:      * @return self
459:      */
460:     public function sharpen()
461:     {
462:         imageconvolution($this->getImageResource(), array( // my magic numbers ;)
463:             array( -1, -1, -1 ),
464:             array( -1, 24, -1 ),
465:             array( -1, -1, -1 ),
466:         ), 16, 0);
467:         return $this;
468:     }
469: 
470: 
471:     /**
472:      * Puts another image into this image.
473:      * @param  Image
474:      * @param  mixed  x-coordinate in pixels or percent
475:      * @param  mixed  y-coordinate in pixels or percent
476:      * @param  int  opacity 0..100
477:      * @return self
478:      */
479:     public function place(Image $image, $left = 0, $top = 0, $opacity = 100)
480:     {
481:         $opacity = max(0, min(100, (int) $opacity));
482: 
483:         if (substr($left, -1) === '%') {
484:             $left = round(($this->getWidth() - $image->getWidth()) / 100 * $left);
485:         }
486: 
487:         if (substr($top, -1) === '%') {
488:             $top = round(($this->getHeight() - $image->getHeight()) / 100 * $top);
489:         }
490: 
491:         if ($opacity === 100) {
492:             imagecopy(
493:                 $this->getImageResource(), $image->getImageResource(),
494:                 $left, $top, 0, 0, $image->getWidth(), $image->getHeight()
495:             );
496: 
497:         } elseif ($opacity <> 0) {
498:             imagecopymerge(
499:                 $this->getImageResource(), $image->getImageResource(),
500:                 $left, $top, 0, 0, $image->getWidth(), $image->getHeight(),
501:                 $opacity
502:             );
503:         }
504:         return $this;
505:     }
506: 
507: 
508:     /**
509:      * Saves image to the file.
510:      * @param  string  filename
511:      * @param  int  quality 0..100 (for JPEG and PNG)
512:      * @param  int  optional image type
513:      * @return bool TRUE on success or FALSE on failure.
514:      */
515:     public function save($file = NULL, $quality = NULL, $type = NULL)
516:     {
517:         if ($type === NULL) {
518:             switch (strtolower(pathinfo($file, PATHINFO_EXTENSION))) {
519:                 case 'jpg':
520:                 case 'jpeg':
521:                     $type = self::JPEG;
522:                     break;
523:                 case 'png':
524:                     $type = self::PNG;
525:                     break;
526:                 case 'gif':
527:                     $type = self::GIF;
528:             }
529:         }
530: 
531:         switch ($type) {
532:             case self::JPEG:
533:                 $quality = $quality === NULL ? 85 : max(0, min(100, (int) $quality));
534:                 return imagejpeg($this->getImageResource(), $file, $quality);
535: 
536:             case self::PNG:
537:                 $quality = $quality === NULL ? 9 : max(0, min(9, (int) $quality));
538:                 return imagepng($this->getImageResource(), $file, $quality);
539: 
540:             case self::GIF:
541:                 return $file === NULL ? imagegif($this->getImageResource()) : imagegif($this->getImageResource(), $file); // PHP bug #44591
542: 
543:             default:
544:                 throw new InvalidArgumentException('Unsupported image type.');
545:         }
546:     }
547: 
548: 
549:     /**
550:      * Outputs image to string.
551:      * @param  int  image type
552:      * @param  int  quality 0..100 (for JPEG and PNG)
553:      * @return string
554:      */
555:     public function toString($type = self::JPEG, $quality = NULL)
556:     {
557:         ob_start();
558:         $this->save(NULL, $quality, $type);
559:         return ob_get_clean();
560:     }
561: 
562: 
563:     /**
564:      * Outputs image to string.
565:      * @return string
566:      */
567:     public function __toString()
568:     {
569:         try {
570:             return $this->toString();
571:         } catch (\Exception $e) {
572:             if (func_num_args()) {
573:                 throw $e;
574:             }
575:             trigger_error("Exception in " . __METHOD__ . "(): {$e->getMessage()} in {$e->getFile()}:{$e->getLine()}", E_USER_ERROR);
576:         }
577:     }
578: 
579: 
580:     /**
581:      * Outputs image to browser.
582:      * @param  int  image type
583:      * @param  int  quality 0..100 (for JPEG and PNG)
584:      * @return bool TRUE on success or FALSE on failure.
585:      */
586:     public function send($type = self::JPEG, $quality = NULL)
587:     {
588:         if ($type !== self::GIF && $type !== self::PNG && $type !== self::JPEG) {
589:             throw new InvalidArgumentException('Unsupported image type.');
590:         }
591:         header('Content-Type: ' . image_type_to_mime_type($type));
592:         return $this->save(NULL, $quality, $type);
593:     }
594: 
595: 
596:     /**
597:      * Call to undefined method.
598:      *
599:      * @param  string  method name
600:      * @param  array   arguments
601:      * @return mixed
602:      * @throws MemberAccessException
603:      */
604:     public function __call($name, $args)
605:     {
606:         $function = 'image' . $name;
607:         if (function_exists($function)) {
608:             foreach ($args as $key => $value) {
609:                 if ($value instanceof self) {
610:                     $args[$key] = $value->getImageResource();
611: 
612:                 } elseif (is_array($value) && isset($value['red'])) { // rgb
613:                     $args[$key] = imagecolorallocatealpha(
614:                         $this->getImageResource(),
615:                         $value['red'], $value['green'], $value['blue'], $value['alpha']
616:                     );
617:                 }
618:             }
619:             array_unshift($args, $this->getImageResource());
620: 
621:             $res = call_user_func_array($function, $args);
622:             return is_resource($res) && get_resource_type($res) === 'gd' ? $this->setImageResource($res) : $res;
623:         }
624: 
625:         return parent::__call($name, $args);
626:     }
627: 
628: }
629: 
630: 
631: /**
632:  * The exception that indicates invalid image file.
633:  */
634: class UnknownImageFileException extends \Exception
635: {
636: }
637: 
Nette Framework 2.0.16 API API documentation generated by ApiGen 2.8.0