A
A
Andrey Golubkov2015-01-24 18:53:37
Delphi
Andrey Golubkov, 2015-01-24 18:53:37

How to display a tiff image in Delphi?

062a0d1330694a3eab594c1b6c73d791.jpg
You need to display an image and overlay text along the coordinates.
coordinates are given as
XY
61.2289 15.32567
56.36088 19.72337
Which component should I use? Or how to implement the plan?
I tried to multiply the coordinates by a number, but the sizes of the pictures are different and the numbers always change.
Delphi only accepts integers.
I drew on the TImage canvas, these are very small numbers for drawing on the canvas.
Image sizes from 2000 to 6000

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
OvLab, 2015-01-24
@Android97

Maybe the coordinates are in percentages and you need to multiply them by the corresponding image size horizontally and vertically and divide by 100?

M
Mercury13, 2015-01-24
@Mercury13

I don’t know yet who supports TIFF (I would have looked, and if I didn’t find it, I would have adjusted the format myself to a degree sufficient for our under-CAD). FreeImage is said to have a Delphi wrapper.
Since you have drawings, apparently, you need to reduce pictures using the Blackman or Lanczos method, it is in Graphics32 .
Second. You need to understand what these fractional numbers mean. It's very unlikely that these are pixel coordinates. And not in pixels - so what? Maybe in linear units - then you need to extract its DPI from TIFF. (Yes, someone claims that the coordinates are in percentages.)
And WARNING!
XY
61.2289 15.32567
56.36088 19.72337
When setting up the reading of our text file, make sure that the reading is locale-independent. That is: put a dot in the language settings instead of a decimal point - and it should not fly off!

A
Arman Toksimbaev, 2015-04-20
@toxicdream

Due to my laziness and perfectionism, I would stick ImageMagick on the side.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question