BMP image and printer resolution
Hi all,
My first question in the forum. Hope will get a good support.
I have one EMF image which I convert to BMP. Now I want to scale the BMP and want to display it in my viewport area. If scaled BMP doesn't fit inside the viewport area then I want to change the scale such that image can fit inside it.
I am able to do above if my device is the screen(1024 X 765 resolution). But in case of printer above doesn't work.
I pass Viewport width in mm, Viewport height in mm, scale, DeviceHorizontalPixelPerMM and DeviceVerticalPixelPerMM to a fun. which convertes my emf to bmp.
This is so because my printer has very high resolution(2400 X 3150). I.e
DeviceHorizontalPixelPerMM and DeviceVerticalPixelPerMM come very large.
Thanks for any help.
[809 byte] By [
jks] at [2007-11-11 10:06:13]

# 1 Re: BMP image and printer resolution
if the size is too much for the functions, you can write your own, there are a variety of interpolation functions used for resizing images. Google "bicubic image resize" for example. You might convert it to a one to one sized bitmap first as bmp is easy to get to raw RGB data while some formats are not so easy (Im unsure what a emf is internally).
jonnin at 2007-11-11 20:59:25 >

# 2 Re: BMP image and printer resolution
Hi,
Thanks for your reply. But I think I haven't put my question properly.
My problem is : If device is screen then my image gets scaled properly and fits inside the viewport area. But if my device is printer then my image gets scaled properly but it doesn't fit inside the viewport area. This is so as printer has very high resolution and thus the number of pixels of the scaled image are very high >1000 pixels.
How should I change my code so that for printer also my scaled image gets fit inside the viewport area.
Please help.
jks at 2007-11-11 21:00:26 >
