View Issue Details

IDProjectCategoryView StatusLast Update
0001406JEDI VCL00 JVCL Componentspublic2004-04-11 02:23
ReporterxerkanAssigned Touser72 
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001406: Create dbImage with suport jpeg
DescriptionI would wonder if there was possible the creation of a component of the type dbimage that had support for the images of the type jpeg, since till now I them have to load one a TImage whenever it changes of record into the data base

The code that I use to load the jpeg in the TImage is the following one:

use jpeg;

procedure TfrmActualizarDatos.MostrarImagen;
    with dtmUtilMenu do
        // Actualizamos la imagen
        if not cdsUtilMenuImagen.IsNull then
        end else

        // Actualiza el estado de los botones dependiendo si ahi o no imagen
        btnEliminarImagen.Enabled:=not cdsUtilMenuImagen.IsNull;
        btnGuardarImagen.Enabled:=not cdsUtilMenuImagen.IsNull;

Additional InformationMe preguntaria si fuese posible la creacion de un componente del tipo dbimage que tuviera soporte para las imagenes del tipo jpeg, ya que hasta ahora tengo que cargarlas un un TImage cada vez que se cambia de registro en la base de datos

El codigo que uso para cargar el jpeg en el TImage es el siguiente:
TagsNo tags attached.



2004-03-02 10:37


This will get a very low priority. Feel free to implement yourself and donate :)


2004-03-03 16:18

viewer   ~0003167

There is some one at Borland's codecentral. I dont remember the exact id nor with what text the search engine give me the hit. It works with other graphic formats guessign the graphic type inspecting the first bytes of the blob contents. It works fairly well when I tested it. AFAIR it uses Borland's code snipets that could cause problems because copyrigth.


2004-03-04 10:28


I found these:

You could use one of those instead...


2004-03-07 15:10

reporter   ~0003255

After proving the components that you have put, the fact that more me taste was 18054, it included his code source for if they want to see it.

Also I include the code source of this component modified by me in order that he adapts himself better to my needs, the modifications done apart from having changed the name are:

- Support for png and gif (the components gifimage.pas and pngimage.pas, I them have extracted of his project "")

- Property ImageType that there brings the type of image that stores the component

- Properties ShrinkToFit and ZoomToFit which belong to the same component but of a top version


2004-03-07 15:13

reporter   ~0003256

I forgot to indicate it, the file is that of the original component while is the modification


2004-04-02 11:06


If you have a working dbimage with jpeg that you can donate to JVCL (you cannot donate other peoples code without their permission), please attach it to this report.

I don't see us doing this ourselves any time soon.


2004-04-02 14:22

reporter   ~0003612

I spoke with the author of the original components (which are free) and be if that agreed in donating his components to the project JVCL, I the only thing that I put they are a few components based on theirs but with reforms created by me.

They can get in touch with the creator of the components by means of his e-mail ( to ask for his conformity.


2004-04-07 12:29

viewer   ~0003688

I got interested in this issue.
I check Borland's code and see that it is minor changes to check blob contents and create correct picture class. But I dont known if this is valid since is Borlan's code.

Sugestions? Comments?


2004-04-07 12:40


How much of the Borland code do you actually need to include? How much of it is generic?


2004-04-07 13:04

viewer   ~0003693

As far as I see, It must be changed only LoadPicture and UpdateData methods. All the code can remain unchanged.

I dont remenber what Borland said about using his code.


2004-04-07 13:06

viewer   ~0003694

By the way, is this the best way to communicate?
I can post to the news group or e-mail you directly.


2004-04-07 13:11


Don't e-mail me directly,please. Post here or in the newsgroup, whatever seems more appropriate to you.


2004-04-07 13:16

viewer   ~0003697

I'm working on the component. I already named TJvDBImage. I will see if it works as I think. But...

I'm using Borland's code as base.
It will be enougth to said that portions of the code was writen by Borland or cant be added to JVCL because licensing?


2004-04-07 13:17


I would have to compare the units to decide

2004-04-07 17:37 (4,797 bytes)


2004-04-07 17:37

viewer   ~0003706

I'm uploading JvDBImage. Please check if it is possible to add to JVCL. If is possible I will create the DCR file.

Now what It does:
- Suppor for JPG, GIF (depending on USE_JV_GIF), ICO, WMF, EMF.
- Also support any TGraphic. You must register the signature via RegisterGraphicSignature. This means that if you use another TGraphic descendentan (such TPNGObject or other image library) there is no need to modify the component.
- OnGetGraphicClass event fired before the image is loaded from blob field. This is a little redundant since programmer can register sigantures but FWIW.


2004-04-08 04:42


Thanks, will have a look during Easter weekend.

2004-04-08 05:56 (3,025 bytes)


2004-04-08 05:56


I've uploaded a new unit with all the Borland code removed. Please try if it works (can't test it myself at the moment)


2004-04-08 08:19

viewer   ~0003718

With my test bed, It works. Of course need more testing.
I added Proportional and change some other things (in my code).
I will merge my changes with your changes, test and upload again.


2004-04-08 08:46

viewer   ~0003720

What delphi version you use?


2004-04-08 08:46


I have also tested now and there is still some issues that I have fixed. I can upload again and you can merge or you uplaod and I merge. Your choice.


2004-04-08 09:02


>What delphi version you use?
I have D5-D7 Ent installed


2004-04-08 09:11

viewer   ~0003723

Please upload. I will merge.
By the way, I have already made the bitmap for this component.
I made only modifications over your code. This means that can be included in JVCL?

About Delphi:
What is the minimun Delphi version which must be supported by JVCL?. I recently drop D6 and only work with D7.

2004-04-08 09:52 (21,665 bytes)


2004-04-08 09:53


> I made only modifications over your code.
> This means that can be included in JVCL?
The code as it is now doesn't contain anything from Borland, so should be fine
> What is the minimun Delphi version which must be supported by JVCL?.
Delphi 5 and BCB 5

I've attached the modified code and a demo that I am using to test it. Please merge and upload again.

BTW, what's your name?


2004-04-08 10:35

viewer   ~0003736

My name is Sergio Samayoa (sergiosamayoa[at],gt)

I just merging your code.
It will be necesary to override other methods since I change PasteFromClippboard and, when control respond to ^V, new method must be called.


2004-04-08 10:43


I've removed the original dbImage attachements since they are of no consequence anymore

2004-04-08 11:31 (5,496 bytes)


2004-04-08 11:37

viewer   ~0003739

I just upload the latest TJvDBImage (dated 04-08-04).
It includes the bitmap for the component.

I think that is *almost* ready for use. I tested it with IBX.
With BDE DOESNT WORK!! (at least with TTable).
I dont known if worth the effort to find why doesnt work.

Appart from support for other image formats I also added Proportional property.

I will be offline from now until saturdad or monday.



2004-04-08 13:53


Fixed. Also added Transparent and AutoSize properties. I will add this to JVCL in the next day or so after I've tested it in design mode and with D5.


2004-04-09 06:01


I've now tested with D5 as well and added the component to JVCL. Thanks for the donation!


2004-04-10 08:36

viewer   ~0003786

Hi Peter.
You shouldnt thank me since you did almost all.


2004-04-10 12:28


> You shouldnt thank me since you did almost all.
That's not fair. You provided the code that actually does something - loads other images but bmp and ico.

To me, that's teamwork at its best: I hadn't been able to do it without you and you might not have been able to remove the Borland code by yourself, so we both provided essential parts to the whole.

Either way, it's a great component!


2004-04-11 02:23


Since the component is now in JVCL, we can close this report

Issue History

Date Modified Username Field Change
2004-03-01 11:50 xerkan New Issue
2004-03-02 10:37 user72 Note Added: 0003154
2004-03-02 10:37 user72 Priority normal => low
2004-03-02 10:37 user72 Status new => acknowledged
2004-03-03 16:18 anonymous Note Added: 0003167
2004-03-04 10:28 user72 Note Added: 0003196
2004-03-07 15:10 xerkan Note Added: 0003255
2004-03-07 15:11 xerkan File Added:
2004-03-07 15:11 xerkan File Added:
2004-03-07 15:13 xerkan Note Added: 0003256
2004-04-02 11:06 user72 Note Added: 0003602
2004-04-02 11:06 user72 Status acknowledged => feedback
2004-04-02 14:22 xerkan Note Added: 0003612
2004-04-07 12:29 anonymous Note Added: 0003688
2004-04-07 12:40 user72 Note Added: 0003691
2004-04-07 13:04 anonymous Note Added: 0003693
2004-04-07 13:06 anonymous Note Added: 0003694
2004-04-07 13:11 user72 Note Added: 0003696
2004-04-07 13:16 anonymous Note Added: 0003697
2004-04-07 13:17 user72 Note Added: 0003698
2004-04-07 17:37 anonymous File Added:
2004-04-07 17:37 anonymous Note Added: 0003706
2004-04-08 04:42 user72 Note Added: 0003711
2004-04-08 05:56 user72 File Added:
2004-04-08 05:56 user72 Note Added: 0003715
2004-04-08 08:19 anonymous Note Added: 0003718
2004-04-08 08:46 anonymous Note Added: 0003720
2004-04-08 08:46 user72 Note Added: 0003721
2004-04-08 09:02 user72 Note Added: 0003722
2004-04-08 09:11 anonymous Note Added: 0003723
2004-04-08 09:52 user72 File Added:
2004-04-08 09:53 user72 Note Added: 0003731
2004-04-08 10:35 anonymous Note Added: 0003736
2004-04-08 10:42 user72 File Deleted:
2004-04-08 10:42 user72 File Deleted:
2004-04-08 10:43 user72 Note Added: 0003737
2004-04-08 10:44 user72 Status feedback => assigned
2004-04-08 10:44 user72 Assigned To => user72
2004-04-08 11:31 anonymous File Added:
2004-04-08 11:37 anonymous Note Added: 0003739
2004-04-08 13:53 user72 Note Added: 0003749
2004-04-09 06:01 user72 Note Added: 0003754
2004-04-10 08:36 anonymous Note Added: 0003786
2004-04-10 12:28 user72 Note Added: 0003788
2004-04-11 02:23 user72 Status assigned => resolved
2004-04-11 02:23 user72 Resolution open => fixed
2004-04-11 02:23 user72 Note Added: 0003795