Last post Mar 10, 2010 10:06 AM by vlad322
Mar 09, 2010 04:02 PM|vlad322|LINK
I have two methods:
Encode - takes a string, converts it to array of bytes, uses bytes to specify colors, creates a color and sets a pixel based on bytes
Decode - takes a pixel, retrieves color (R,G,B) bytes and converts them to characters, that produces a string which was previously encoded
I'm using two for loops (img height/width) to specify position and access pixels
The issue is that once display (Control Panel\Appearance and Personalization\Display) changes to anything other then "Smaller - 100%",
bytes have different values during decoding, thus different string is produced (corrupted).
If the setting is set to "Smaller - 100%" the results are normal.
What can I do to avoid that problem?
Thanks in advance
Mar 09, 2010 05:45 PM|SGWellens|LINK
If you scale a bitmap, the underlying bits must change.
So you cannot scale the bitmap and expect the bits to stay the same.
Mar 10, 2010 10:06 AM|vlad322|LINK
What about using images with indexed pixel format?