Astrolab Posted October 21, 2011 Posted October 21, 2011 It is Delphi2010,mysql(devaart unidac) configuration, I put tUniDBimage on form , set datasource, and when i set datafield which is image-blob field from TUniQuery it shows error "Bitmap is not valid". Quote
Astrolab Posted October 21, 2011 Author Posted October 21, 2011 next code works with tUniImage component,but i want do it with tUniDbImage. procedure TMainForm.UniDBGrid1CellClick(Column: TUniDBGridColumn); var JpegImage: TJPEGImage; BlobStream: TStream; begin with UniServerModule do begin if (not UniQuery1.FieldByName('picture').IsNull) then begin BlobStream := UniQuery1.CreateBlobStream(UniQuery1.FieldByName('picture'),bmRead); JpegImage := TJPEGImage.Create; try JpegImage.LoadFromStream(BlobStream); UniImage1.Picture.Assign(JpegImage); UniImage1.Visible := True; finally JpegImage.Free; BlobStream.Free; end; end else UniImage1.Visible := False; end; end; Quote
ttamturk Posted May 17, 2012 Posted May 17, 2012 Hi Farshad, I need jpg image upload with uniDBImage... Delphi XE2, MsSQL2008, Devart Unidac UniFileUpload + tUniDBimage I can upload BMP image but not JPG image! it shows error "Bitmap is not valid". It is Delphi2010,mysql(devaart unidac) configuration, I put tUniDBimage on form , set datasource, and when i set datafield which is image-blob field from TUniQuery it shows error "Bitmap is not valid". Quote
AtoZ Posted May 18, 2012 Posted May 18, 2012 This is an old Delphi one So it works in VCL ? Be nice to have it working directly with jpg and others. Thx, Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.