PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD20] Is dRotation fundamentally flawed?
[WD20] Is dRotation fundamentally flawed?
Iniciado por guest, 02,nov. 2015 16:46 - 2 respuestas
Publicado el 02,noviembre 2015 - 16:46
If I scan in a driver's license and the scan comes in portrait(red box), how can I rotate the image to landscape and fill the entire black box without losing too much image quality? I am using TwainToJPG().

Also when I use dRotation on an image, that image fails to save to the Db when I use HLinkMemo().
[attachment 1756 Untitled.png]
Publicado el 02,noviembre 2015 - 18:58
Hi Curtis,

in my experience, drotation works fine. But you need to take care of a few things:

1. forget about image VARIABLE, and use an image field (variables are newer and do not support everything)

2. make sure that your image is inside a SQUARE image field before you rotate, so that rotation can happen correctly

3. make sure that the image field is at the correct size (if your original image is 1024*768, then your image field should be set as 100% centered, 1024*1024).

4. once the rotation is done, do a dsaveimagepng of the result, THEN link that file to your memo.

With that system, there is no quality loss to speak of

Best regards
Publicado el 02,noviembre 2015 - 21:12
Thank you! I should have thought about the square issue.