PDA

Click to See Complete Forum and Search --> : Pictures Encoding. How?


/\/\isanThr0p
May 10th, 2002, 07:46 PM
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...

ChiefRB
May 11th, 2002, 06:38 AM
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?

Arie
May 11th, 2002, 02:52 PM
I want to encrypt them, so no-one will can open them in a simple way. any ideas?

thank you,
Arie.

now.at/ariecoolsite

Zaei
May 11th, 2002, 03:31 PM
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.

ChiefRB
May 11th, 2002, 04:11 PM
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?

Arie
May 12th, 2002, 12:45 PM
I look forward to lock the PrintScreen button and encrypt my images. any code?

Thank you so far,
Arie.

now.at/ariecoolsite

ChiefRB
May 13th, 2002, 02:17 PM
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.

Arie
May 22nd, 2002, 02:43 PM
Ok....

But how can I block the PrintScreen button with simple API code?

Thank you,
Arie.

now.at/ariecoolsite

aicungbiet
May 23rd, 2002, 12:15 AM
There are many ways to capture your screen. It is not usefull to lock the printscrn button.

OK !

Arie
May 23rd, 2002, 02:33 AM
So how can I protect my game images???

Any one?

Thank you,
Arie.

now.at/ariecoolsite

Yhoko
May 23rd, 2002, 03:11 AM
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.

Arie
May 23rd, 2002, 02:16 PM
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

/\/\isanThr0p
May 23rd, 2002, 02:51 PM
Yhoko would it still be possible to open files like that in photoshop or other good graphics programs?

Yhoko
May 23rd, 2002, 04:42 PM
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:

ChiefRB
May 23rd, 2002, 05:42 PM
Re: Arie

Look up the PlaySound API function.

Arie
May 24th, 2002, 01:42 PM
Thank you.

Arie.

now.at/ariecoolsite