Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TDBImage in 2016


This question is not answered.


Permlink Replies: 5 - Last Post: Jul 4, 2016 11:51 PM Last Post By: Lajos Juhasz
Johnathan Smith

Posts: 10
Registered: 1/16/16
TDBImage in 2016  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 11, 2016 5:14 AM
How to store PNG files (with transparency) in ancient TDBImage, which only supports the also ancient BMP format?
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: TDBImage in 2016
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 11, 2016 10:39 AM   in response to: Johnathan Smith in response to: Johnathan Smith
Johnathan wrote:

How to store PNG files (with transparency) in ancient TDBImage,
which only supports the also ancient BMP format?

You can't. You would have to convert the PNG to BMP before storing it in
the DB. TDBImage only knows about TBitmap, so it cannot handle non-BMP formats,
that is a hard-coded limitation. If that is not acceptable to you, you will
have to stop using TDBImage and switch to a 3rd party replacement component
that supports PNG, or write your own solution. You could just use a regular
TImage instead, and perform the DB store+retrieve operations manually when
needed using whatever TGraphic-derived classes you want (in this case, TPngImage).

--
Remy Lebeau (TeamB)
Mário Reis

Posts: 26
Registered: 9/16/06
Re: TDBImage in 2016  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 4, 2016 3:57 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:
Johnathan wrote:

How to store PNG files (with transparency) in ancient TDBImage,
which only supports the also ancient BMP format?

You can't. You would have to convert the PNG to BMP before storing it in
the DB. TDBImage only knows about TBitmap, so it cannot handle non-BMP formats,
that is a hard-coded limitation. If that is not acceptable to you, you will
have to stop using TDBImage and switch to a 3rd party replacement component
that supports PNG, or write your own solution. You could just use a regular
TImage instead, and perform the DB store+retrieve operations manually when
needed using whatever TGraphic-derived classes you want (in this case, TPngImage).

--
Remy Lebeau (TeamB)
Mário Reis

Posts: 26
Registered: 9/16/06
Re: TDBImage in 2016  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 4, 2016 4:07 PM   in response to: Mário Reis in response to: Mário Reis
Mário Reis wrote:
Dear Sir,
I'm a registred user of Delphi since Borland/Delphi5 till Delphi XE7 and i wonder how come is it possible that so far a suposed Professional RAD tool doesn't not yet support a component to deal with
DBImages from of all types!!! As far as i realise we are talking about PROfessional & RAD tool that in year 2016 that doesn't yet have a TDBimage component support in it's "Data Controls" pallete it just suport's BMP like in the very old days of windows 3 or windows3.11 in old 1995/6 and delphi1/2/3/...5
I meam after 20/22 years we stil have the very same component to deal with dbimages that of course doesn't support most of the actual formats some much smaller and with better resolution the bmp.
I'm sorry but somebody must take this issue on their on hands and make sure this will be, what should i say, fixed... for a better RAD professional toll without having to write 20 to 50 lines of code
to insert, edit and save or view a jpg, png and other formats every time we have to deal with images.
I sincerly hope you understand what i do mean.
Best regards

Remy Lebeau (TeamB) wrote:
Johnathan wrote:

How to store PNG files (with transparency) in ancient TDBImage,
which only supports the also ancient BMP format?

You can't. You would have to convert the PNG to BMP before storing it in
the DB. TDBImage only knows about TBitmap, so it cannot handle non-BMP formats,
that is a hard-coded limitation. If that is not acceptable to you, you will
have to stop using TDBImage and switch to a 3rd party replacement component
that supports PNG, or write your own solution. You could just use a regular
TImage instead, and perform the DB store+retrieve operations manually when
needed using whatever TGraphic-derived classes you want (in this case, TPngImage).

--
Remy Lebeau (TeamB)
Lajos Juhasz

Posts: 801
Registered: 3/14/14
Re: TDBImage in 2016  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 4, 2016 11:51 PM   in response to: Mário Reis in response to: Mário Reis
Mário Reis wrote:

I meam after 20/22 years we stil have the very same component to deal
with dbimages that of course doesn't support most of the actual
formats some much smaller and with better resolution the bmp. I'm
sorry but somebody must take this issue on their on hands and make
sure this will be, what should i say, fixed... for a better RAD
professional toll without having to write 20 to 50 lines of code to
insert, edit and save or view a jpg, png and other formats every time
we have to deal with images. I sincerly hope you understand what i
do mean. Best regards

I bet they would like to stay compatibile with older versions of
Delphi. However this shouldn't stop them to introduce a TAdvDBImage. By
the way you have free components that support multiple formats.
Quentin Correll


Posts: 2,412
Registered: 12/1/99
Re: TDBImage in 2016  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 4, 2016 4:11 PM   in response to: Mário Reis in response to: Mário Reis
Mário,

You wanted to type something? <g>

--

Q -- XanaNews 1.19.1.372 - 2016-07-04 16:11:07
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02