Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Custom file type

Custom file type

Scheduled Pinned Locked Moved C#
helpquestionlearning
20 Posts 9 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Etienne_123

    Hi I have a friend who's a photographer and he's looking for a way to burn DVDs for his customers with the photos on. He wants to include both low resolution and high resolution photos on the disc, but he doesn't want his customers to be able to access the high res photos. They must bring the disc to him if they want any photos printed. What I suggested to him was to create an application that will allow him to save the photos in a different file format, and only he must be able to open these photos with this application. I quickly fiddled with some code and saved an image in a different file format, but then of course one can still open these files by simply using the "Open With" dialog. I know there must be more to it than simply just saving it in a different file format. Maybe using some form of Serializer? Any help in the right direction would be appreciated.

    A Offline
    A Offline
    AspDotNetDev
    wrote on last edited by
    #9

    An alternate idea... Save the high resolution images to a database on your computer. Associate a unique key to each photo, or just create a single key for an entire batch of images. Include that key(s) on the DVD with the low resolution images. When the customer gives you the DVD, use that key to lookup the high resolution pictures on your computer. The "database", "key", and "computer" can be anything you like. For example, one configuration might be:

    Database: SQL Server
    Key: GUID
    Computer: PC

    Alternate cofiguration:

    Database: Excel File
    Key: Customer name and date the photos were put on the DVD
    Computer: DVD's with the key written on them

    No need to put the data in the user's hands.

    [Forum Guidelines]

    1 Reply Last reply
    0
    • E Etienne_123

      Hi I have a friend who's a photographer and he's looking for a way to burn DVDs for his customers with the photos on. He wants to include both low resolution and high resolution photos on the disc, but he doesn't want his customers to be able to access the high res photos. They must bring the disc to him if they want any photos printed. What I suggested to him was to create an application that will allow him to save the photos in a different file format, and only he must be able to open these photos with this application. I quickly fiddled with some code and saved an image in a different file format, but then of course one can still open these files by simply using the "Open With" dialog. I know there must be more to it than simply just saving it in a different file format. Maybe using some form of Serializer? Any help in the right direction would be appreciated.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #10

      Store the Picture in Sqlite DataBase and lock it with password

      I know nothing , I know nothing ...

      1 Reply Last reply
      0
      • E Etienne_123

        Which encryption algorithm would you recommend though? There are numerous included in .NET. The one I came across that works fine is "RijndaelManaged".

        OriginalGriffO Offline
        OriginalGriffO Offline
        OriginalGriff
        wrote on last edited by
        #11

        For your situation I wouldn't go for anything too complex - All you want is something that bollixes up the simple user from getting his high-res pics for free, I assume? Follow this[^] and you won't go too far wrong - it's pretty easy to follow, but without your key it's pretty much unbreakable. It won't stop the FBI or the mafia, but then I hope your pictures wouldn't interest either! :laugh:

        Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

        E 1 Reply Last reply
        0
        • E Etienne_123

          Hi I have a friend who's a photographer and he's looking for a way to burn DVDs for his customers with the photos on. He wants to include both low resolution and high resolution photos on the disc, but he doesn't want his customers to be able to access the high res photos. They must bring the disc to him if they want any photos printed. What I suggested to him was to create an application that will allow him to save the photos in a different file format, and only he must be able to open these photos with this application. I quickly fiddled with some code and saved an image in a different file format, but then of course one can still open these files by simply using the "Open With" dialog. I know there must be more to it than simply just saving it in a different file format. Maybe using some form of Serializer? Any help in the right direction would be appreciated.

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #12

          The best way to keep secrets is to not have any. If they must come to him to have images printed anyway, why even store them on the disc? Keeping them does put the onus on the photographer for storage but I'd be surprised if doesn't already have a backup plan. It also gives the option for a client to call/email an order and have them sent.


          I know the language. I've read a book. - _Madmatt

          E 1 Reply Last reply
          0
          • OriginalGriffO OriginalGriff

            For your situation I wouldn't go for anything too complex - All you want is something that bollixes up the simple user from getting his high-res pics for free, I assume? Follow this[^] and you won't go too far wrong - it's pretty easy to follow, but without your key it's pretty much unbreakable. It won't stop the FBI or the mafia, but then I hope your pictures wouldn't interest either! :laugh:

            Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

            E Offline
            E Offline
            Etienne_123
            wrote on last edited by
            #13

            Yes you're completely right. While we're on the subject, would it be possible to compile all of these photos into one single encrypted package which can then only be opened by the application? That would be ideal, but if I have to store all the files separately then that's not a train smash either.

            OriginalGriffO 1 Reply Last reply
            0
            • N Not Active

              The best way to keep secrets is to not have any. If they must come to him to have images printed anyway, why even store them on the disc? Keeping them does put the onus on the photographer for storage but I'd be surprised if doesn't already have a backup plan. It also gives the option for a client to call/email an order and have them sent.


              I know the language. I've read a book. - _Madmatt

              E Offline
              E Offline
              Etienne_123
              wrote on last edited by
              #14

              I asked the same question :-D The only reason I can think of is that he does not want to keep backups of all his photos.

              1 Reply Last reply
              0
              • L Luc Pattyn

                put the hi-res files inside a password-protected ZIP; or encrypt them. :)

                Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

                Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

                Y Offline
                Y Offline
                Yusuf
                wrote on last edited by
                #15

                Luc Pattyn wrote:

                a password-protected ZIP

                very easy to copy and crack :thumbsdown:

                Luc Pattyn wrote:

                encrypt them

                better alternative. :thumbsup:

                Yusuf May I help you?

                A 1 Reply Last reply
                0
                • E Etienne_123

                  Hi I have a friend who's a photographer and he's looking for a way to burn DVDs for his customers with the photos on. He wants to include both low resolution and high resolution photos on the disc, but he doesn't want his customers to be able to access the high res photos. They must bring the disc to him if they want any photos printed. What I suggested to him was to create an application that will allow him to save the photos in a different file format, and only he must be able to open these photos with this application. I quickly fiddled with some code and saved an image in a different file format, but then of course one can still open these files by simply using the "Open With" dialog. I know there must be more to it than simply just saving it in a different file format. Maybe using some form of Serializer? Any help in the right direction would be appreciated.

                  Y Offline
                  Y Offline
                  Yusuf
                  wrote on last edited by
                  #16

                  Another Idea. Leave the hi-res images as hi-res so the customer can open them and see the difference. But put distinct watermark, so when printed it does not look good.

                  Yusuf May I help you?

                  1 Reply Last reply
                  0
                  • Y Yusuf

                    Luc Pattyn wrote:

                    a password-protected ZIP

                    very easy to copy and crack :thumbsdown:

                    Luc Pattyn wrote:

                    encrypt them

                    better alternative. :thumbsup:

                    Yusuf May I help you?

                    A Offline
                    A Offline
                    AspDotNetDev
                    wrote on last edited by
                    #17

                    You do realize that password-protecting a ZIP file is a form of encryption, right?

                    [Forum Guidelines]

                    Y 1 Reply Last reply
                    0
                    • A AspDotNetDev

                      You do realize that password-protecting a ZIP file is a form of encryption, right?

                      [Forum Guidelines]

                      Y Offline
                      Y Offline
                      Yusuf
                      wrote on last edited by
                      #18

                      One of the weakest types of encryption, huh! :^)

                      Yusuf May I help you?

                      A 1 Reply Last reply
                      0
                      • Y Yusuf

                        One of the weakest types of encryption, huh! :^)

                        Yusuf May I help you?

                        A Offline
                        A Offline
                        AspDotNetDev
                        wrote on last edited by
                        #19

                        I don't know, is 256-bit AES encryption weak?

                        [Forum Guidelines]

                        1 Reply Last reply
                        0
                        • E Etienne_123

                          Yes you're completely right. While we're on the subject, would it be possible to compile all of these photos into one single encrypted package which can then only be opened by the application? That would be ideal, but if I have to store all the files separately then that's not a train smash either.

                          OriginalGriffO Offline
                          OriginalGriffO Offline
                          OriginalGriff
                          wrote on last edited by
                          #20

                          Yes - the encryption doesn't care what the content is. I would suggest either a simple directory structure, or just a length prefix/filename combination to each file so you can extract them from the decrypted stream.

                          Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

                          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups