-
you could just make your own image file with some UDT that would look like
type pic
width as long
height as long
color() as long
end type
than you would need to load it and get it into a picture somehow...
I think there are nice and fast ways with copymemory and stuff like that but I don't really know about that to much.. you should ask fox about this kind of stuff...
a slower way would be to write a function that draws it pixelwise into some dc... but that would be easy...
-
When you say "encode" them, what do you mean? Do you want to encrypt them, or convert them to a different format, or perhaps alter the colors a little?
-
I want to encrypt them, so no-one will can open them in a simple way. any ideas?
thank you,
Arie.
now.at/ariecoolsite
-
You could use a simple Xor Encryption, though it would be very insecure, as the most common color in an image is black, so frequency tests are easy. You could pad your images, at the cost of diskspace, with junk values.
Z.
-
To encrypt them, just treat them as any other binary data. Serach for encryption on www.pscode.com there's lots of free stuff there.
Not all of it is worth looking at, but writing decent encryption is hard.
If you're using the images in a game, won't they be visible on the screen? If this is the case, then what's to stop the user simply taking a screenshot?
-
I look forward to lock the PrintScreen button and encrypt my images. any code?
Thank you so far,
Arie.
now.at/ariecoolsite
-
You could block the PrintScrn button, but then whats to stop people using a program like Screen Thief to take a screenshot?
To disable the key, you have to set up a keyboard hook. EventVB.DLL will help you do this, check it out at www.merrioncomputing.com
The only safe way to protect images is not to display them on a screen. If the monitor can see them, so can the user, and so they can be copied.
-
Ok....
But how can I block the PrintScreen button with simple API code?
Thank you,
Arie.
now.at/ariecoolsite
-
There are many ways to capture your screen. It is not usefull to lock the printscrn button.
OK !
-
So how can I protect my game images???
Any one?
Thank you,
Arie.
now.at/ariecoolsite
-
Any kind of (even simple) encryption, even just replacing the first byte of your bitmap files (so you can't open them in MSPaint) will prevent 80% of the users from opening your bitmaps.
-
Ok. Thank you for helping.
Now,
Can anyone tell me, how can I play a mp3 file with API code?
Thank you,
Arie.
now.at/ariecoolsite
-
Yhoko would it still be possible to open files like that in photoshop or other good graphics programs?
-
Sure, in PhotoPaint you can open nearly every file (even textfiles and such ;)) but if you make any kind of encryption like the XOR trick most people won't be able to open them anymore. And as I said, 80% or more of all users wouldn't even be able to open bitmaps if they were just renamed to .gfx files :rolleyes:
-
Re: Arie
Look up the PlaySound API function.
-