View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001406 | JEDI VCL | 00 JVCL Components | public | 2004-03-01 11:50 | 2004-04-11 02:23 |
Reporter | xerkan | Assigned To | user72 | ||
Priority | low | Severity | feature | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0001406: Create dbImage with suport jpeg | ||||
Description | I 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; var Jpeg:TJpegImage; Corriente:TMemoryStream; begin with dtmUtilMenu do begin // Actualizamos la imagen if not cdsUtilMenuImagen.IsNull then begin Jpeg:=TJpegImage.create; Corriente:=TMemoryStream.create; cdsUtilMenuImagen.SaveToStream(Corriente); Corriente.Seek(0,soFromBeginning); Jpeg.LoadFromStream(Corriente); imgAplicacion.Picture.Assign(Jpeg); Corriente.Free; Jpeg.Free; end else imgAplicacion.Picture:=nil; // Actualiza el estado de los botones dependiendo si ahi o no imagen btnEliminarImagen.Enabled:=not cdsUtilMenuImagen.IsNull; btnGuardarImagen.Enabled:=not cdsUtilMenuImagen.IsNull; end; end; | ||||
Additional Information | Me 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: ........ | ||||
Tags | No tags attached. | ||||
|
This will get a very low priority. Feel free to implement yourself and donate :) |
|
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. |
|
I found these: http://codecentral.borland.com/codecentral/ccweb.exe/listing?id=15936 http://codecentral.borland.com/codecentral/ccweb.exe/listing?id=18054 http://codecentral.borland.com/codecentral/ccweb.exe/listing?id=13229 You could use one of those instead... |
|
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 "JVCL3-2004-03-07.zip") - 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 |
|
I forgot to indicate it, the file EDBImageX6.zip is that of the original component while dcDBImage.zip is the modification |
|
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. |
|
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 (DelphiHelper@yahoo.com.ar) to ask for his conformity. |
|
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? |
|
How much of the Borland code do you actually need to include? How much of it is generic? |
|
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. |
|
By the way, is this the best way to communicate? I can post to the news group or e-mail you directly. |
|
Don't e-mail me directly,please. Post here or in the newsgroup, whatever seems more appropriate to you. |
|
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? |
|
I would have to compare the units to decide |
2004-04-07 17:37
|
JvDBImage.zip (4,797 bytes) |
|
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. |
|
Thanks, will have a look during Easter weekend. |
2004-04-08 05:56
|
JvDBImageReduced.zip (3,025 bytes) |
|
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) |
|
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. Ok? |
|
What delphi version you use? |
|
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. |
|
>What delphi version you use? I have D5-D7 Ent installed |
|
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? Thanks. 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
|
JvDBImageWithDemo.zip (21,665 bytes) |
|
> 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? |
|
My name is Sergio Samayoa (sergiosamayoa[at]icon.com,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. |
|
I've removed the original dbImage attachements since they are of no consequence anymore |
2004-04-08 11:31
|
JvDBImage.zip (5,496 bytes) |
|
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. Regards. |
|
> With BDE DOESNT WORK!! 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. |
|
I've now tested with D5 as well and added the component to JVCL. Thanks for the donation! |
|
Hi Peter. You shouldnt thank me since you did almost all. Regards. |
|
> 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! |
|
Since the component is now in JVCL, we can close this report |
Date Modified | Username | Field | Change |
---|---|---|---|
2004-03-01 11:50 | xerkan | New Issue | |
2004-03-02 10:37 |
|
Note Added: 0003154 | |
2004-03-02 10:37 |
|
Priority | normal => low |
2004-03-02 10:37 |
|
Status | new => acknowledged |
2004-03-03 16:18 | anonymous | Note Added: 0003167 | |
2004-03-04 10:28 |
|
Note Added: 0003196 | |
2004-03-07 15:10 | xerkan | Note Added: 0003255 | |
2004-03-07 15:11 | xerkan | File Added: EDBImageX6.zip | |
2004-03-07 15:11 | xerkan | File Added: dcDBImage.zip | |
2004-03-07 15:13 | xerkan | Note Added: 0003256 | |
2004-04-02 11:06 |
|
Note Added: 0003602 | |
2004-04-02 11:06 |
|
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 |
|
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 |
|
Note Added: 0003696 | |
2004-04-07 13:16 | anonymous | Note Added: 0003697 | |
2004-04-07 13:17 |
|
Note Added: 0003698 | |
2004-04-07 17:37 | anonymous | File Added: JvDBImage.zip | |
2004-04-07 17:37 | anonymous | Note Added: 0003706 | |
2004-04-08 04:42 |
|
Note Added: 0003711 | |
2004-04-08 05:56 |
|
File Added: JvDBImageReduced.zip | |
2004-04-08 05:56 |
|
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 |
|
Note Added: 0003721 | |
2004-04-08 09:02 |
|
Note Added: 0003722 | |
2004-04-08 09:11 | anonymous | Note Added: 0003723 | |
2004-04-08 09:52 |
|
File Added: JvDBImageWithDemo.zip | |
2004-04-08 09:53 |
|
Note Added: 0003731 | |
2004-04-08 10:35 | anonymous | Note Added: 0003736 | |
2004-04-08 10:42 |
|
File Deleted: EDBImageX6.zip | |
2004-04-08 10:42 |
|
File Deleted: dcDBImage.zip | |
2004-04-08 10:43 |
|
Note Added: 0003737 | |
2004-04-08 10:44 |
|
Status | feedback => assigned |
2004-04-08 10:44 |
|
Assigned To | => user72 |
2004-04-08 11:31 | anonymous | File Added: JvDBImage.zip | |
2004-04-08 11:37 | anonymous | Note Added: 0003739 | |
2004-04-08 13:53 |
|
Note Added: 0003749 | |
2004-04-09 06:01 |
|
Note Added: 0003754 | |
2004-04-10 08:36 | anonymous | Note Added: 0003786 | |
2004-04-10 12:28 |
|
Note Added: 0003788 | |
2004-04-11 02:23 |
|
Status | assigned => resolved |
2004-04-11 02:23 |
|
Resolution | open => fixed |
2004-04-11 02:23 |
|
Note Added: 0003795 |