Results 1 to 12 of 12

Thread: Open a JPG in an encrypted zip file

  1. #1

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Open a JPG in an encrypted zip file

    We want to put JPG images of students on a pocket PC.

    We were thinking of putting them into an encrypted zip file to protect the images from loss.

    Is it possible to use New Bitmap("zip folder\xyz.jpg" in some way?

    Any other ideas on how to accomplish this?

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  2. #2
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: Open a JPG in an encrypted zip file

    The System.IO.Compression.GZipStream class will let you put stuff in zip files. Not sure if it works on pocket pcs though..
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  3. #3

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Open a JPG in an encrypted zip file

    Of course it's not there - this VS for PPC is so stripped down...

    Arrgghh...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Open a JPG in an encrypted zip file

    Moved at member's request

  5. #5

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Open a JPG in an encrypted zip file

    Hate to bump this - but I'm still looking for some suggestions...

    Any ideas on how a folder can be encrypted on a PPC so that the JPG images in it cannot be viewed outside my app?

    There might be so many images that an SD card will be used to hold them.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  6. #6
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Open a JPG in an encrypted zip file

    Hi,
    you can use the sharplib free zip class, and zip and unzip them, and give them a different extension, so double-clicking wouldn't automatically unzip them. Then unzip to a temp file, and load up the temp file.

    Otherwise there are several 3rd party libraries for zipping, including Resco and n/software

    Pete
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  7. #7

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Open a JPG in an encrypted zip file

    Does the zip's you suggest support encryption?

    The idea is that when a user clicks on a student name they get the student schedule and also see the picture of the student on top of that schedule (it disappears if they click the picture).

    This is working fine right now - each student image is a separate JPG - and I show them like this:

    Code:
            Dim l_bmp As Bitmap
            Try
                l_bmp = New Bitmap(strBaseFolder & "\" & "000000".Substring(0, 6 - strId.Length) & strId & ".jpg")
                pbxStudent.Image = l_bmp
                pbxStudent.Visible = True
                pbxStudent.BringToFront()
            Catch ex As Exception
                pbxStudent.Visible = False
            End Try
    So - it sound like the method you suggest might be slow in comparison to what I'm doing now. I could copy out the picture from the zip file - but then I have to be careful to delete and so on.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  8. #8
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Open a JPG in an encrypted zip file

    Hi,
    that is similar to what we do now to view signatures held as pictures.

    Not tried it, but I would guess if you changed the extension of the file from .jpg to .xxx then you should still be able to load them as you do, but double-clicking on them by a user in explorer would do nothing

    Pete
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  9. #9

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Open a JPG in an encrypted zip file

    Quote Originally Posted by petevick
    ...
    Not tried it, but I would guess if you changed the extension of the file from .jpg to .xxx then you should still be able to load them as you do, but double-clicking on them by a user in explorer would do nothing

    Pete
    I agree - I already changed the .SDF extension to .DLH (don't look here!)...

    But having 1200 jpgs with .XYZ extensions in a folder - and the PPC gets lost - it might not take too much time for someone to figure out that they might be pictures. I'm concerned about having 1200 student images get lost and hit the newspapers! Especially with my app being responsible!

    I wonder if SQL CE can store IMAGE or BINARY data - I might look into that next...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  10. #10
    Fanatic Member Strider's Avatar
    Join Date
    Sep 2004
    Location
    Dublin, Ireland
    Posts
    612

    Re: Open a JPG in an encrypted zip file

    yes sqlce can store images... i use it storing signature capture on the devices before sending them over WebService to our SQL Server... dont know how fast it will be, depending on the size of your images.
    Barry


    Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
    .NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0

    SQL Server 2005/2000/SQL Server CE 2.0


    If you like, rate this post

    Compact Framework for Beginners

  11. #11

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Open a JPG in an encrypted zip file

    Quote Originally Posted by Strider
    yes sqlce can store images... i use it storing signature capture on the devices before sending them over WebService to our SQL Server... dont know how fast it will be, depending on the size of your images.
    Thanks!

    Would you mind posting some examples of loading an image into a SQL CE field and retrieving it?

    Thanks again!

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  12. #12
    Fanatic Member Strider's Avatar
    Join Date
    Sep 2004
    Location
    Dublin, Ireland
    Posts
    612

    Re: Open a JPG in an encrypted zip file

    i will tomorrow... but i can tell you i save the signature as a bitmap, then read in the bitmap and store in sqlce before deleting the image.

    i haven't tried reading an image from SqlCe using CF, only on the full framework and there are lots of examples, but im sure it can be done.

    i nice idea would be to populate a sql server database with the the data including the images, and use RemoteDataAccess(RDA) or Replication to pull it onto the device (this is very fast).
    Barry


    Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
    .NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0

    SQL Server 2005/2000/SQL Server CE 2.0


    If you like, rate this post

    Compact Framework for Beginners

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