Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2002
    Location
    Baghdad, Iraq
    Posts
    697

    Cool Unanswered: OLE Objects and generating thumbnails

    I know what you're thinking... yet again, someone wants to use OLE Objects in Access.

    But I've done a little legwork and determined that:

    1. You can use an OLE Object field as a BLOB, thanks to the handy WriteBLOB and ReadBLOB functions MS has in their knowledgebase.

    2. And if you embed a BMP, you get a thumbnail, so long as you keep it down to a reasonable size.

    So now I'm poking around trying to find utilities to convert things to BMPs. All of the Word apps can be coaxed into saving docs as HTML, and there's a handy little program called ThumbPage that will convert HTML to BMP. Of course, it's got a GUI and lots of crap, but being on SourceForge I might be able to strip most of that away and turn it into a command line program.

    And I think there are utilities out there that will convert PDFs to BMPs, and other utilities to convert other images. At any rate... once I have the BMP scaled, cropped and reduced to 4 bit grayscale it should be pretty reasonable.

    All this is a heck of a lot of work and requires having separate utilities bundled with my app, but my goal is that the user can drag at most common doc formats into the field and have a thumbnail generated while the original can be retrieved by clicking.

    Anyone got an easier way? I'm trying to avoid those $500 COM objects, and the default OLE Object interface is a complete mess.

  2. #2
    Join Date
    Sep 2006
    Posts
    265
    Using Objects as Large as Elephants is a bit like towing a wheel barrow with a Kenwood truck! A database is for data and it is needlessly inefficient to ask a database to hurdle over images as blobs to get to the underlying data. Secondly even though you may have the images down to a reasonable size; jpegs have such a small footprint compared with a bit map image.

    I invested in dbpix years ago and it the best purchase I every made. We have about 13,500 images both locally and on the web.

    Simon

  3. #3
    Join Date
    Oct 2002
    Location
    Baghdad, Iraq
    Posts
    697
    Quote Originally Posted by SimonMT
    Using Objects as Large as Elephants is a bit like towing a wheel barrow with a Kenwood truck! A database is for data and it is needlessly inefficient to ask a database to hurdle over images as blobs to get to the underlying data.
    Why? The BLOBs are, by design, separated from the rest of the data. The only difference is that the DBMS keeps track of them. If you store data outside the DBMS you have to write extra code to make sure that it's still there, the admin has to take special measures to back it up, etc.

    Secondly even though you may have the images down to a reasonable size; jpegs have such a small footprint compared with a bit map image.

    I invested in dbpix years ago and it the best purchase I every made. We have about 13,500 images both locally and on the web.

    Simon
    One issue I read about was that Access "natively" recognizes BMP, RLE, WMF and EMF. Since it uses JPG via an OLE server, what you're actually doing is storing both the JPG and a BMP copy of the JPG.

    If it weren't for that, I would definitely use BMPs. As to investing in DBPix, it sounds attractive *but* I'm not cataloging images, for the most part. This is a database for a platoon in a Cavalry troop. We've got to maintain lots of paperwork and I'd like to be able to see thumbnails of Office documents and PDFs, mostly. DBPix doesn't really address this usage.

Posting Permissions

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