Welcome, Guest
Username: Password: Remember me
Components and Libraries for Database Development, discussions, problems and suggestions
  • Page:
  • 1

TOPIC:

Dbimage example ? 6 years 8 months ago #11448

  • Ramon Retamar
  • Ramon Retamar's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 32
  • Thank you received: 0
Hi.
I have a very simple test firebird 2.5 database, with a BLOB binaty field (type 0, size 80).

In a test form place a DBImage component, and add a single code to load a image (BMP or JPG) from file. The code work without error, but when run the application again (with blob field with image content, at open table display error 'EinvalidGraphic' with message "Unknown picture format".

I using this code to load picture into blob field using dbimage component:
procedure TForm1.LoadImageButton1Click(Sender: TObject);
begin
  ExampleTable.Edit;
  DBImage1.WriteHeader:= False;
  DBImage1.Picture.LoadFromFile( FileNameEdit1.FileName );
 // And call to POST event to save the changes in registry
end;

This is the code for the sample Firebird 2.5 database (one field :D ):
CREATE TABLE EXAMPLE (
    MY_IMAGE  BLOB SUB_TYPE 0 SEGMENT SIZE 80
);

I test with BMP and JPG images, and fail in both cases when run the app for display image in dbimage component.

Any idea ?

In Spanish (sorry by my poor english):

Hola.
Tengo un problema con una base dedatos Firebird 2.5 que contiene un campo de tipo BLOB binario (tipo 0, longitud 80).

En un formulario de pruebas, coloco (ademas de los componentes para acceso a la base de datos) un componente DBImage, y el código para agregar una imagen en formato BMP o JPG desde un archivo. Funciona bien al leer el archivo y guardarlo en el campo, pero al ejecutar nuevamente la aplicación, cuando tienen que mostrar la imagen en el componente DBImage, se produce el error: 'EinvalidGraphic' con el mensaje "Unknown picture format".

Este es el código que uso para cargar la imagen desde un fichero:
procedure TForm1.LoadImageButton1Click(Sender: TObject);
begin
  ExampleTable.Edit;
  DBImage1.WriteHeader:= False;
  DBImage1.Picture.LoadFromFile( FileNameEdit1.FileName );
 // Y luego uso POST para guardar los cambios
end;

Este es el código para la tabla Firebird 2.5 (un solo campo !!! :D ):
CREATE TABLE EXAMPLE (
    MY_IMAGE  BLOB SUB_TYPE 0 SEGMENT SIZE 80
);

Hice la prueba con archivos BMP y JPG, en ambos casos se guardan (y en ese momento se muestran en el componente DBImage) , pero al intentar ejecutar de nuevo la aplicación, recibo un mensaje de error desde DbImage.

Ramon

Please Log in or Create an account to join the conversation.

Dbimage example ? 6 years 8 months ago #11449

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1105
  • Thank you received: 161
A sample for test ?
and please more info
CT version, OS etc...
PilotLogic Core Programmer

Please Log in or Create an account to join the conversation.

Dbimage example ? 6 years 8 months ago #11451

  • Ramon Retamar
  • Ramon Retamar's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 32
  • Thank you received: 0
I use CT 5.8 with Windows 7 x64.

Please Log in or Create an account to join the conversation.

Dbimage example ? 6 years 8 months ago #11456

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1105
  • Thank you received: 161
Please
try and the latest CT 6.40
We fix a lot of problems in these six CodeTyphon releases...
PilotLogic Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Matis A..

Dbimage example ? 6 years 8 months ago #11460

  • Ramon Retamar
  • Ramon Retamar's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 32
  • Thank you received: 0
Hi.
Thanks for response.

I don't update CT version for this bug:

www.pilotlogic.com/sitejoom/index.php/fo...n-trlimage-component

Is fixed in the last version o have a patch ?.

Thanks.

Please Log in or Create an account to join the conversation.

Dbimage example ? 6 years 8 months ago #11461

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1105
  • Thank you received: 161
This problem exists
we must focus on this.
Give us time...
PilotLogic Core Programmer
The following user(s) said Thank You: Ramon Retamar

Please Log in or Create an account to join the conversation.

  • Page:
  • 1