[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 123[4]5678910 ]

[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 08:14:09 04/19/03 Sat
Author: glup
Subject: Identify graphic type

I have to create for an existing picture database with more than 500.000 pictures a new frontend. Even the database tables contain lots of information regarding the images stored in blobs, there is no information of the image type.
I have stored the blob content into files and analysed it with Linux fileinfo to identify the file type. With this information it was easy to load the image with the appropirate envision class. For some multi-page images I have encountered errors, but the original program reported them too.

I'm not allowed to modify the database structure, e.g. to introduce a new field with the image type I had identified using fileinfo once during migration.

Now the question:
How can I avoid using fileinfo to identify the image type? I'm missing something like

class function TDibImage.CanLoad( const aStream: TStream ): boolean;

If I try to load the image with all possible envision classes until I find one where no error occur, the identification takes very long and seams not allways to be correct. The identifation with fileinfo is at least 5 times faster and in my 200 test cases correct.



[ Next Thread | Previous Thread | Next Message | Previous Message ]


[ Contact Forum Admin ]

Forum timezone: GMT-5
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.