Hola.
Primero que nada me disculpo con
_Leo por las pruebas que tuvo que realizar por mi desacierto.
Y para no dejar el caso inconcluso, este código muestra en un componente
TImage los tipos de imagenes soportados y cuya
firma sea evaluada y creada en consecuencia.
Código PHP:
void __fastcall TForm1::DataSource1DataChange(TObject *Sender,
TField *Field)
{
unsigned short us;
TBlobField *blob = static_cast<TBlobField*>(IBDataSet1->FieldByName("IMAGE"));
CopyMemory(&us, &blob->Value[1], sizeof(us));
AnsiString st = IntToHex(us, 4);
TGraphic *gr;
try {
if (st == "4D42") gr = new Graphics::TBitmap;
else if (st == "D8FF") gr = new TJPEGImage;
else if (st == "0000") gr = new TIcon;
else if (st == "5089") gr = new TPNGObject;
// etc, etc, ...
gr->Assign(blob);
Image1->Picture = NULL;
Image1->Picture->Bitmap->Height = gr->Height;
Image1->Picture->Bitmap->Width = gr->Width;
Image1->Picture->Bitmap->Canvas->Draw(0, 0, gr);
} __finally {
delete gr;
}
}
Saludos