Results 1 to 16 of 16

Thread: Pictures Encoding. How?

  1. #1

    Thread Starter
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    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...
    Sanity is a full time job

    Puh das war harter Stoff!

  2. #2
    Hyperactive Member
    Join Date
    Apr 2002
    Location
    uk
    Posts
    327
    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?

  3. #3
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636
    I want to encrypt them, so no-one will can open them in a simple way. any ideas?

    thank you,
    Arie.

    now.at/ariecoolsite

  4. #4
    Zaei
    Guest
    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.

  5. #5
    Hyperactive Member
    Join Date
    Apr 2002
    Location
    uk
    Posts
    327
    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?

  6. #6
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636
    I look forward to lock the PrintScreen button and encrypt my images. any code?

    Thank you so far,
    Arie.

    now.at/ariecoolsite

  7. #7
    Hyperactive Member
    Join Date
    Apr 2002
    Location
    uk
    Posts
    327
    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.

  8. #8
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636
    Ok....

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

    Thank you,
    Arie.

    now.at/ariecoolsite

  9. #9
    New Member
    Join Date
    May 2002
    Posts
    13
    There are many ways to capture your screen. It is not usefull to lock the printscrn button.

    OK !

  10. #10
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636
    So how can I protect my game images???

    Any one?

    Thank you,
    Arie.

    now.at/ariecoolsite

  11. #11
    Member Yhoko's Avatar
    Join Date
    May 2002
    Posts
    47
    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.

  12. #12
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636
    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

  13. #13

    Thread Starter
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    Yhoko would it still be possible to open files like that in photoshop or other good graphics programs?
    Sanity is a full time job

    Puh das war harter Stoff!

  14. #14
    Member Yhoko's Avatar
    Join Date
    May 2002
    Posts
    47
    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

  15. #15
    Hyperactive Member
    Join Date
    Apr 2002
    Location
    uk
    Posts
    327
    Re: Arie

    Look up the PlaySound API function.

  16. #16
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636
    Thank you.

    Arie.

    now.at/ariecoolsite

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width