HPDF-1.7: Generation of PDF documents
Copyright(c) 2006-2016 alpheccar.org
LicenseBSD-style
Maintainermisc@NOSPAMalpheccar.org
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Graphics.PDF.Image

Description

PDF Images

Synopsis

Images

Types

data PDFJpeg Source #

A Jpeg PDF object

Instances

Instances details
PDFXObject PDFJpeg Source # 
Instance details

Defined in Graphics.PDF.Image

data JpegFile Source #

A Jpeg file

data RawImage Source #

A raw image

Instances

Instances details
PDFXObject RawImage Source # 
Instance details

Defined in Graphics.PDF.Image

Functions

createPDFJpeg :: JpegFile -> PDF (PDFReference PDFJpeg) Source #

Use an abstract description of a Jpeg to return a PDFReference that can be used to manipulate the Jpeg in the context of the PDF document

readJpegFile :: FilePath -> IO (Either String JpegFile) Source #

Read a JPEG file and return an abstract description of its content or an error The read is not lazy. The whole image will be loaded into memory

jpegBounds :: JpegFile -> (Int, Int) Source #

Get the JPEG bounds

readJpegDataURL :: String -> Either String JpegFile Source #

Reads a data URL string, and returns a JpegFile. The incoming string must be a correctly formatted data URL for a JPEG. You can convert jpeg files to data URLs at the following web site: http://dataurl.net/#dataurlmaker

createPDFRawImageFromARGB Source #

Arguments

:: Int

Width

-> Int

Height

-> Bool

Interpolation

-> Vector Word32

ARGB pixels (A component not used y the PDF document)

-> PDF (PDFReference RawImage) 

createPDFRawImageFromByteString Source #

Arguments

:: Int

Width

-> Int

Height

-> Bool

Interpolation

-> PDFFilter

Decompression filter to be sued by the PDF reader to render the picture

-> ByteString

RGB pixels

-> PDF (PDFReference RawImage)