- This topic has 1 reply, 1 voice, and was last updated 12 years, 9 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
The TWAIN Resource site is designed to help TWAIN users and prospective users find resources in the community for TWAIN-related products and services. Become a member.
Home › Forums › TWAIN Classic › Crooked DIB from Xerox WorkCentre
Hi.
DIB-image taken from scanner is crooked. Can you explain why?
Picture, taken by standart scanner program (it is correct):
Picture i got by my application (it is incorrect):
I dont know why it happens. I am not sure the problem is in algorithm or wrong BMP’s header fields. I copy pixels data directly from DIB handler to BMP file, so there must not be data loss. If i set anything wrong at BMP’s header (image width or something else) then deformation of image must be regular. So i think prolbem is in DS. Maybe i need to change some capabilities?
Thanks in advance!
I got is -.-” It was wrong writing DIB data to file.
Problem was in line “fopen_s(&file, fname, “w”);”,
it must be “fopen_s(&file, fname, “wb”);”