BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Dynamic image loading

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (General)
View previous topic :: View next topic  
Author Message
Ray Mond
Guest





PostPosted: Thu May 10, 2007 3:37 pm    Post subject: Dynamic image loading Reply with quote



I have a database table which contains an image (blob) column. Is there a
component that I can use, which I can load the blob (or data stream) into,
and the component can then figure out the type of image (bmp, jpg, gif,
png), and display the image accordingly? I do not want to have to 'tell'
the component the type of image that's stored, because I don't have that
information.

Thanks.


Ray Mond
Back to top
Torry
Guest





PostPosted: Thu May 10, 2007 3:52 pm    Post subject: Re: Dynamic image loading Reply with quote



Quote:
I have a database table which contains an image (blob) column. Is there a
component that I can use, which I can load the blob (or data stream) into,
and the component can then figure out the type of image (bmp, jpg, gif,
png), and display the image accordingly? I do not want to have to 'tell'
the component the type of image that's stored, because I don't have that
information.

At least two products of Microolap contains free component for JPEG images -
TDBImageEx.

Products are PostgresDAC (for PostreSQL -
http://www.microolap.com/products/connectivity/postgresdac/) and DAC for
MySQL (for MySQL - http://www.microolap.com/products/connectivity/mysqldac/)

I think that it can be partially rewritten to support the other formats as
well.

--
Best regards
Maxim Peresada
Torry's Delphi Pages http://www.torry.net
Back to top
Dean Hill
Guest





PostPosted: Fri May 11, 2007 12:30 am    Post subject: Re: Dynamic image loading Reply with quote



Ray Mond wrote:

Quote:
I have a database table which contains an image (blob) column. Is
there a component that I can use, which I can load the blob (or data
stream) into, and the component can then figure out the type of image
(bmp, jpg, gif, png), and display the image accordingly? I do not
want to have to 'tell' the component the type of image that's stored,
because I don't have that information.

ImageEn from Hi-Components will do this (http://www.hicomponents.com)
with their LoadFromStream method on the ImageEnIO component.

--
Dean
Back to top
Martijn Tonies
Guest





PostPosted: Fri May 11, 2007 8:13 am    Post subject: Re: Dynamic image loading Reply with quote

Quote:
I have a database table which contains an image (blob) column. Is there a
component that I can use, which I can load the blob (or data stream) into,
and the component can then figure out the type of image (bmp, jpg, gif,
png), and display the image accordingly? I do not want to have to 'tell'
the component the type of image that's stored, because I don't have that
information.

Ray,

You can show these types (and others) in a TImage. But if you do
not know the type of the image, you need to figure it out yourself.

I've done this for the BLOB Editor in Database Workbench and it's
fairly easy to do.

Search for "magic numbers file formats" in Google and you'll get a hint
of how to do it. Basically, you check the first few bytes and try to
detect the file type from that.


--
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
Back to top
Ray Mond
Guest





PostPosted: Tue May 15, 2007 8:13 am    Post subject: Re: Dynamic image loading Reply with quote

Thanks, everyone, for the suggestions.

Ray Mond
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (General) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.