Landscape orientation for bitmap driver

I implemented a virtual image printer driver based on the bitmap driver sample code in the DDK. According to the bitmap driver document, the landscape orientation is not implemented. Only portrait is available. My question is how to solve this issue?
I have read all the printer driver threads in this forum. There is no real solution for this.
It seems that the best way to solve this is to rotate the rendered bitmap image or bitmap file after I get it.
In the bitmap driver environment, only BITMAPINFO, image width and height, and image data are available for me to use in the rotation. No HDC/CDC, No Window/Frame. I need to work directly on the bitmap image. What is the best way to rotate the image data?
Also the bpp might be 1, 4, 8, and 24. I think I have to take care of theose in the rotation.

Any suggestions or advice, web site articles for me?

Any help will be greatly appreciated!

I do not know whether things have changed since NT4.0 or not but it
was the case with NT4.0.

We wanted a landscape mode for a Card printer for bitmaps and ended up
rotating the bitmaps. We did this in Language monitor on the rendered
bitmap.

Regards
Bala

On 5/7/08, xxxxx@hotmail.com wrote:
> I implemented a virtual image printer driver based on the bitmap driver sample code in the DDK. According to the bitmap driver document, the landscape orientation is not implemented. Only portrait is available. My question is how to solve this issue?
> I have read all the printer driver threads in this forum. There is no real solution for this.
> It seems that the best way to solve this is to rotate the rendered bitmap image or bitmap file after I get it.
> In the bitmap driver environment, only BITMAPINFO, image width and height, and image data are available for me to use in the rotation. No HDC/CDC, No Window/Frame. I need to work directly on the bitmap image. What is the best way to rotate the image data?
> Also the bpp might be 1, 4, 8, and 24. I think I have to take care of theose in the rotation.
>
> Any suggestions or advice, web site articles for me?
>
> Any help will be greatly appreciated!
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>

On Wed, May 7, 2008 at 3:08 PM, wrote:
> I implemented a virtual image printer driver based on the bitmap driver sample code in the DDK.
> According to the bitmap driver document, the landscape orientation is not implemented.
> Only portrait is available.

It has been a while since I tested this, but as I recall, if you
select landscape, you end up with a very wide and short bitmap, where
the upper left corner contains the data you expect to find at the
upper left corner… I found no need for rotating anything…

However, if you print several pages, the challenge becomes how to
split them into separate bitmaps for each page.

My solution was crude, I merely tagged the bitmap with a page count
(using one of the reserved fields in the bmp header) and modified my
reader code accordingly. Since my app is the only consumer of the
output, that worked splendidly.


Rune

Thank both of you for your quick reply.
It seems that I need to rotate the bitmap for each page if necessary.
As I stated before, I have bitmapinfo, image data, W and H to be used in the rotation only.
So that becomes my next task. I searched web for solution and there is no function I can use in my situaion. The closest one is GetRoatedBitamp() from CodeGuru, which uses DIB, no pixel, No CDC.
I tried it once. It did not work. I guess hDIB is the handle to the bitmap file.
Any suggestion for the bitmap rotation function?
Thanks a lot!

Why not only change the sizes from (X, Y) to (Y, X) for landscape?


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

wrote in message news:xxxxx@ntdev…
> I implemented a virtual image printer driver based on the bitmap driver
sample code in the DDK. According to the bitmap driver document, the landscape
orientation is not implemented. Only portrait is available. My question is how
to solve this issue?
> I have read all the printer driver threads in this forum. There is no real
solution for this.
> It seems that the best way to solve this is to rotate the rendered bitmap
image or bitmap file after I get it.
> In the bitmap driver environment, only BITMAPINFO, image width and height,
and image data are available for me to use in the rotation. No HDC/CDC, No
Window/Frame. I need to work directly on the bitmap image. What is the best way
to rotate the image data?
> Also the bpp might be 1, 4, 8, and 24. I think I have to take care of theose
in the rotation.
>
> Any suggestions or advice, web site articles for me?
>
> Any help will be greatly appreciated!
>
>