Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

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

(no description)

Author: Nicola Asuni
Version: 1.0.005
File Size: 360 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