Search

Atalasoft Knowledge Base

INFO: PdfSpace vs ImageSpace (different coordnate systems used in PDF vs Image objects)

Tananda
DotImage

Definitions / Jargon

First, a couple "definitions" that specifically apply to how we use certain terms in this article - this is NOT an exhaustive dictionary.

Image

as used in this article, we mean an AtalaIamge object or more broadly a "RASTER" image which means an image object that is based on a "grid of pixels" as opposed to specific image formats (tiff, jpeg, etc)

PDF

as used in this article we're referring to a pdf but NOT as an image extracted or rasterized from a PDF

ImageSpace / Image Space / Image Coordinates

ImageSpace and these other terms will refer to how one navigates coordinates when working with an Image object

PdfSpace / PDF Space / PDF Coordinates

PdfSpace will refer to how one navigates coordinates when working with a PDF in one of our classes such as PdfDocument, PdfGeneratedDocument, PdfTextDocument, etc

Point

A system.Drawing.Point object which is expressing an X, Y coordinate in ImageSpace

In Image space, a Point is integer value as a single point identifies a single pixel there is no such thing as a partial pixel in ImageSpace

PdfPoint

A System.Drawing.PointF object which is expressing an X, Y coordinate in PdfSpace

Critically, a PdfPoint is 1/72 of an inch AND the PdfSpace coordinates are measured 0,0 is bottom left and as X increases you move right (same as ImageSpace) but eacn uniit is a 1/72 inch step, but as Y increases you go UP toward the TOP of the page (also segmented into 1/72 of an inch)

Concepts

Images from PdfDecoder

When you use our PdfDecoder to make an AtalaImage ... the PdfDecoder RASTERIZES the image .. converting whatever the 100% VIEW of a specific page is into a grid of pixels with the PdfDecoder.Resolution (default is 96 which is quite low) is set to. Once you have an AtalaImage, the fact that it came from PDF doesn't matter.. it's now an Image and is living in "ImageSpace"

Details
Last Modified: 2 Years Ago
Last Modified By: Tananda
Type: INFO
Article not rated yet.
Article has been viewed 1.1K times.
Options
Also In This Category