[ros-kernel] FIXES FIXES FIXES Lots of fixes
Waldo Alvarez Cañizares
wac at lab.matcom.uh.cu
Wed Feb 18 15:05:47 CET 2004
Try my original code using srcpitch:
int IntPart = ((SrcHeight / TgtHeight) * SrcPitch)/2; // Exactly this, dividing by 2 at the end on purpose
I remember that using the other code[ int IntPart = (SrcHeight / TgtHeight) * SrcWidth; ] wasn't working for me. Is some kind of rounding artifact or something. However it should be fixed some other way.
In pure math
int IntPart = (SrcHeight / TgtHeight) * SrcWidth;
is the same as
((SrcHeight / TgtHeight) * SrcPitch)/2;
computers are a little bit different.
Use a dbgprint to get the value of Intpart and check that it is a multiple of srcpitch
Regards
Waldo
________________________________
From: ros-kernel-bounces at reactos.com on behalf of Aleksey Bragin
Sent: Wed 2/18/2004 6:31 AM
To: ReactOS Kernel List
Subject: Re: [ros-kernel] FIXES FIXES FIXES Lots of fixes
----- Original Message -----
From: "Filip Navara" <xnavara at volny.cz>
To: "ReactOS Kernel List" <ros-kernel at reactos.com>
Sent: Sunday, February 15, 2004 1:33 AM
Subject: Re: [ros-kernel] FIXES FIXES FIXES Lots of fixes
> [snip]
> The correct code is
> int IntPart = (SrcHeight / TgtHeight) * SrcWidth;
> Commited that.
Have you tried stretchblt.exe? Upsizing of lena is OK, but shrinking (zoom <
100%) is broken. If it work for toolbar icons and AbiWord/WinZip
splashscreens in the release, then it's ok, but nevertheless I will revise
that code this week.
WBR,
Aleksey Bragin.
_______________________________________________
Ros-kernel mailing list
Ros-kernel at reactos.com
http://reactos.com/mailman/listinfo/ros-kernel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 5169 bytes
Desc: not available
Url : http://reactos.com:8080/pipermail/ros-kernel/attachments/20040218/6d96c7e9/attachment.bin
More information about the Ros-kernel
mailing list