Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 310 and 311] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403] [Versions 39 and 311]

(no description)

Author: Nicola Asuni
Version: 1.0.005
File Size: 357 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

TCPDF_IMAGES:: (6 methods):
  getImageFileType()
  setGDImageTransparency()
  _toPNG()
  _toJPEG()
  _parsejpeg()
  _parsepng()


Class: TCPDF_IMAGES  - X-Ref


getImageFileType($imgfile, $iminfo=array()   X-Ref
Return the image type given the file name or array returned by getimagesize() function.

param: $imgfile (string) image file name
param: $iminfo (array) array of image information returned by getimagesize() function.
return: string image type

setGDImageTransparency($new_image, $image)   X-Ref
Set the transparency for the given GD image.

param: $new_image (image) GD image object
param: $image (image) GD image object.

_toPNG($image, $tempfile)   X-Ref
Convert the loaded image to a PNG and then return a structure for the PDF creator.
This function requires GD library and write access to the directory defined on K_PATH_CACHE constant.

param: $image (image) Image object.
param: $tempfile (string) Temporary file name.

_toJPEG($image, $quality, $tempfile)   X-Ref
Convert the loaded image to a JPEG and then return a structure for the PDF creator.
This function requires GD library and write access to the directory defined on K_PATH_CACHE constant.

param: $image (image) Image object.
param: $quality (int) JPEG quality.
param: $tempfile (string) Temporary file name.

_parsejpeg($file)   X-Ref
Extract info from a JPEG file without using the GD library.

param: $file (string) image file to parse
return: array structure containing the image data

_parsepng($file)   X-Ref
Extract info from a PNG file without using the GD library.

param: $file (string) image file to parse
return: array structure containing the image data