Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Want to do something crazy with .bmp files
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01289665
Message ID:
01289841
Views:
22
>>>>>>Hmmm...doesnt seem to like that. Of course it doesn't like what I'm trying either...this is what I've got:
>>>>>>
>>>>>>     IF MOD(nR+nG+nB,2)=1  && Pixel Sum is Odd, convert to White
>>>>>>        SYS(2600, nOffset+nPos, 3, 0hFFFFFF)
>>>>>>      ELSE  && Pixel Sum is Even, convert to Black
>>>>>>        SYS(2600, nOffset+nPos, 3,  0x000000)
>>>>>>      ENDIF
>>>>>>
>>>>>
>>>>>You are close, just use 0h000000 (varbinary) instead of 0x000000 (integer)
>>>>
>>>>Yeah that was it...thanks!
>>>
>>>
>>>Hi Victor,
>>>
>>>There's a cool sample in the GdiPlusX library that deals with the Lockbits() function to apply some interesting image effects.
>>>
>>>Run Demo.prg, and select the "LockBits" sample.
>>>
>>>BTW, may I ask you why do you need this crazy effect in your image ?
>>
>>Making a long story short, the concept it to hide text messages in the image...obviously this is just a small part of the puzzle - but the idea is to hide the text message in such a way that someone can run a program to see it.
>
>
>I understand.
>How fast was the LockBits sample that Bo sent you ?
>Is it ok for your image ?
..haven't tried it yet...

>
>Do you need more speed on this ?
...naa - it works fast enough.
>
>Anyway, the aproach of summing the RGB values will not allow you to revert the effect.
Yeah I know - this was just kind of a proof of concept thing - that I *can* change the colors on the bitmap.
>
>Maybe you could just open your image, save the original header intact, and encrypt only the bitmap data part of the image file, using any available free DLL. This will bring you much faster results.
...intersting idea, perhaps I'll thinker around a bit and see how that works...
ICQ 10556 (ya), 254117
Previous
Reply
Map
View

Click here to load this message in the networking platform