Aged Delphi program needs help on saving graphics to DB 
Author Message
 Aged Delphi program needs help on saving graphics to DB

In the old days I used to learn new techniques by taking a
thick book into the bath and spending a couple of hours
soaking and learning - difficult with a CD - so I need help.

I want to write a print spooling system which lets the user
review on screen and then print and ghen save the page
images to a file/database so that he can later review what
has been printed by recalling pages from the database.

So my problem is ...

having got the page image on printer.canvas, how do I save this
to a MSSQL or Paradox database with  a tag which lets me
retrieve it later ?   Do I use blob fields? Can I compress before I
write to the db?

Any help would be appreciated.

Peter Yellow
approachng 60 years!
London UK



Wed, 18 Jun 1902 08:00:00 GMT  
 Aged Delphi program needs help on saving graphics to DB



Quote:
> In the old days I used to learn new techniques by taking a
> thick book into the bath and spending a couple of hours
> soaking and learning - difficult with a CD - so I need help.

> I want to write a print spooling system which lets the user
> review on screen and then print and ghen save the page
> images to a file/database so that he can later review what
> has been printed by recalling pages from the database.

> So my problem is ...

> having got the page image on printer.canvas, how do I save this
> to a MSSQL or Paradox database with  a tag which lets me
> retrieve it later ?   Do I use blob fields? Can I compress before I
> write to the db?

> Any help would be appreciated.

> Peter Yellow
> approachng 60 years!
> London UK

Use BLOB fields. But they are the big difficulty today :  not every database
have compatible formats and most of them are restricted (<2Mb or so). You
can expect lots of errors from there. Therefore, in a first time you should
avoid compression just to make it run...

To tag it, use SetBookMark.

Louis. ( approaching 44 ! )



Wed, 18 Jun 1902 08:00:00 GMT  
 Aged Delphi program needs help on saving graphics to DB
My guess would be to use a tMetaFileCanvas to do your drawing.  This
creates a 'WMF' - windows meta file, which is just a 'recording' of all
graphic (GDI in window parlance) calls.  You can then save this Canvas to
any stream you like, including the blob stream, which is important for you.
 Getting it back is just like reading from the blob screen and then
rendering the WMF on a normal canvas (such as a canvas - device context in
windows parlance).

The {*filter*} problem is setting up the TMetaFileCanvas, because here you need
to specify the width and height in advance.  You will need a special Canvas
per page you want to print, so will need to take care of that too when
viewing the 'file' afterwards.

Please mail if this was a useful comment
--
Van den Driessche Willy




Quote:
> In the old days I used to learn new techniques by taking a
> thick book into the bath and spending a couple of hours
> soaking and learning - difficult with a CD - so I need help.

> I want to write a print spooling system which lets the user
> review on screen and then print and ghen save the page
> images to a file/database so that he can later review what
> has been printed by recalling pages from the database.

> So my problem is ...

> having got the page image on printer.canvas, how do I save this
> to a MSSQL or Paradox database with  a tag which lets me
> retrieve it later ?   Do I use blob fields? Can I compress before I
> write to the db?

> Any help would be appreciated.

> Peter Yellow
> approachng 60 years!
> London UK



Wed, 18 Jun 1902 08:00:00 GMT  
 Aged Delphi program needs help on saving graphics to DB
Peter,

You could try just saving your graphic to disk in your favourite
format - bit map or whatever. You could then just save the path to the
graphics in your database in a text field. You could then do a "Load
From File" into a TImage or do something similar using the path from
the appropriate record. it would make you Database table a lot more
agile.

Hope this helps,

Ian Millward (62)

On Mon, 3 May 1999 12:58:34 +0100, "Peter Yellow"

Quote:

>In the old days I used to learn new techniques by taking a
>thick book into the bath and spending a couple of hours
>soaking and learning - difficult with a CD - so I need help.

>I want to write a print spooling system which lets the user
>review on screen and then print and ghen save the page
>images to a file/database so that he can later review what
>has been printed by recalling pages from the database.

>So my problem is ...

>having got the page image on printer.canvas, how do I save this
>to a MSSQL or Paradox database with  a tag which lets me
>retrieve it later ?   Do I use blob fields? Can I compress before I
>write to the db?

>Any help would be appreciated.

>Peter Yellow
>approachng 60 years!
>London UK



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Need help with DB programming in Delphi

2. Help:Saving Graphic Image Into A BLOB Graphic Field In Paradox Table

3. Savings graphics to db tables

4. help : I need to calculate an age from a date of birth

5. need help on programming 3d graphics.

6. Need help with 3d graphics programming.

7. Need help with graphic array reading program.

8. Beginner needs help with Delphi DB app

9. Need Help- Delphi prog. generates strange db files

10. Need good program to create help files for Delphi apps

11. Help needed with saving JPEG images to table

12. Need HELP FINISHING PROGRAM (posted program) PASCAL

 

 
Powered by phpBB® Forum Software