Re: TImage problem! Help Please!

From: J French (erewhon_at_nowhere.uk)
Date: 12/16/04

  • Next message: Maarten Wiltink: "Re: Using an array to dynamically create menus..."
    Date: Thu, 16 Dec 2004 08:04:44 +0000 (UTC)
    
    

    On Wed, 15 Dec 2004 19:16:29 -0000, "J West" <jimw@fluffypaws.co.uk>
    wrote:

    >What?
    >Sorry that doesn't make any sense at all!
    >The Image HAS to save out to a memory stream or a file in order to be able
    >to assign the picture to the relevant BLOB parameter in my ADOQuery.
    >As fr using button as custom forms I agree you can't if you wanted to do
    >something like that then use a panel but I am most cerainly not trying to do
    >this!
    >
    >Maybe I should have explained what I'm doing a little more clearly (Having
    >one of those weeks)!
    >
    >I was having difficulty getting an image into a mysql database. My
    >application is a multi tier app and my data classes weren't getting their
    >picture property set properly so I set up a little test bed to check my
    >assignments and found that my code was incorrect having sorted out my code I
    >was left with the problem I posted here which Mike Shkolnik has kindly
    >corrected for me and now the picture properties and the memory streams are
    >now working brilliantly.
    >
    >I am now however left with problems getting the images back out of the
    >database as my TImage on my form is only partially loading the image back
    >in.
    >
    >Hmmmmm! maybe I just need a brain transplant as I have now been trying to
    >get this thing working for two weeks and everytime I solve a problem I get
    >another one.
    >
    >anyway thanks muchly for the response

    I was a bit taken aback by the typecasting of

       TJPEGImage(Image1.Picture.bitmap)

    I'm surprized that it is valid - I now see that it is

    I've found that some uses of SaveToStream write an 8 byte header
    before the actual data - that is TGraphic.SaveToStream( Strm )

    Somewhere in the Delphi Help I saw something about saving graphics to
    a TBlobStream ... if they are going into a database


  • Next message: Maarten Wiltink: "Re: Using an array to dynamically create menus..."

    Relevant Pages

    • Re: TImage problem! Help Please!
      ... The Image HAS to save out to a memory stream or a file in order to be able ... I was having difficulty getting an image into a mysql database. ... picture property set properly so I set up a little test bed to check my ... database as my TImage on my form is only partially loading the image back ...
      (alt.comp.lang.borland-delphi)
    • setting null image.Picture property
      ... I'm working on distributing a database using VS Tools for Office, ... but the .Picture property still ... Errors when opening in design ... images when I go back to that same report in design view. ...
      (comp.databases.ms-access)
    • Re: Can images be saved to Session State and retrieved?
      ... here is the code to retrieve the image from the database. ... Assuming that the column in the database table is defined as Image ... //Creating memory stream with the raw image data ... pull the image from the session state. ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Response a binary from Sql server
      ... i've stuck up an example of how to return image/jpeg content from a database ... memory stream to the Response stream. ... In a nutshell, select the blob, get memory stream, write the response ...
      (microsoft.public.dotnet.languages.csharp)
    • RE: Resize image from SQL server and display in asp:image
      ... One field in the database is an image data type field and one field ... I write the object's byteinto a memory stream. ... I use the GetThumbnailImage method from the Bitmap object to resize the image ... I am also using a webservice to transport data. ...
      (microsoft.public.dotnet.general)