Re: upside down bitmap

Tech-Archive recommends: Fix windows errors by optimizing your registry



Please don't top-post. I know that Joseph is doing it, but noone will rebuke him for this (it would be like telling God to have a decent shave).

Joseph M. Newcomer wrote:
>>(a) read the bitmap
>>(b) create another bitmap which is the inverse
>>(c) BitBlt that bitmap into the desired bitmap.
>>
>>You can implicitly invert a bitmap while transferring it by using PlgBlt,
>> which performs implicitly steps (b) and (c) above. You need to apply the following
>> multipliers to the pt
>>array
>>
>>pt[0].x 1
>>pt[0].y 1
>>pt[1];x 0
>>pt[1].y 1
>>pt[2].x 1
>>pt[2].y 0


William wrote:
Thanks Joseph.
But I still don't know how to do (b) by PlgBlt. I just look at MSDN about
PlgBlt. It says "rotation and shear transformations are not allowed".

If you read the bitmap into the _source device context_, you don't change its transformation, so this restriction of PlgBlt doesn't influence your problem (Keep in mind that only the source device context is restricted to transformations that don't include shearings and rotations). It would be interested, though, why this restriction is necessary at all.

Regards,
Stuart
.



Relevant Pages

  • Re: upside down bitmap
    ... But I still don't know how to do by PlgBlt. ... It says "rotation and shear transformations are not allowed". ... BitBlt that bitmap into the desired bitmap. ...
    (microsoft.public.vc.mfc)
  • Re: Replacing the system mouse cursor
    ... PlgBlt is a fast way to rotate a bitmap. ... mouse_eventto inject mouse movements and clicks into Windows. ...
    (microsoft.public.vc.mfc)
  • Re: Newbie basic question
    ... Joseph> See below... ... >> I just started to look at the documentation for GDI today. ... Joseph> just GetDIBits and work directly on the bitmap. ... >> import the images to other programs, such as Photoshop and After ...
    (microsoft.public.win32.programmer.gdi)
  • Re: upside down bitmap
    ... I think he confused his intended goal (a rotation transformation of the bitmap from source ... You can implicitly invert a bitmap while transferring it by using PlgBlt, ...
    (microsoft.public.vc.mfc)
  • Re: help with adding formatable text in bitmap file
    ... Thanks Joseph, I could do till TextOut; but i dont know how to write ... Is there API for that or any sample code will help. ... Select the bitmap into a DC. ...
    (microsoft.public.vc.mfc)