--- In advanced_delphi@yahoogroups.com, "Jeremy Grand" <jer...@...> wrote:
> Dim gr As Graphics = Me.CreateGraphics 'jhg 04/26/2005 > Dim twipsToPixelsLocal As Decimal = gr.DpiX / 1440 '182 / 2552 > 'jhg 04/25/2005 I think VB must have use GDI+. plain GDI didn't have the necessary function to deal with what dpi an object is designed for. I've found out that to determined adobe .eps, or .jpg size in milli meters, I have to decode the files header. Or even scan through its data and make harsh assumption. wiiih.. Other options is to find scratch of codes in GIMP library, or dig deeper in GDI+. .jpg files has a record of pixel per inch in it's header. may be that is what gr.DpiX represents. I've experienced one miscalculation out of two attempts, so I'm surfing the web for more clues. ( I found TPrintPreview in Preview.zip from www.delphiarea.com, but it doesn't work right ;o( ). ------------ FIreHAzaR:-D West Java, Indonesia