 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
John Cooper Guest
|
Posted: Mon Oct 03, 2005 6:07 pm Post subject: File Type tips |
|
|
Hello guys
I need some tips to write image files on database.
I need some information some the best file type, colors, compression,
quality, etc...
My images will be black an white.
Can anyone help me?
Thanks a lot!
|
|
| Back to top |
|
 |
Ivan Sivak Jr. Guest
|
Posted: Mon Oct 03, 2005 6:43 pm Post subject: Re: File Type tips |
|
|
hi,
I think you could use GIF, make histogram and choose the
best possible value....
I guess this url could help you http://www.wotsit.org/search.asp?s=graphics
regards,
ivan
"John Cooper" <john.n.cooper (AT) gmail (DOT) com> píše v diskusním příspěvku
news:4341727f (AT) newsgroups (DOT) borland.com...
| Quote: | Hello guys
I need some tips to write image files on database.
I need some information some the best file type, colors, compression,
quality, etc...
My images will be black an white.
Can anyone help me?
Thanks a lot!
|
|
|
| Back to top |
|
 |
Ben Hochstrasser Guest
|
Posted: Mon Oct 03, 2005 6:59 pm Post subject: Re: File Type tips |
|
|
John Cooper wrote:
| Quote: | My images will be black an white.
|
Black and white (1 bit) or grayscale (8 bit)? Loss (jpeg) or lossless
(PNG/TIF/PCX etc)?
Do you want them to store within the DB file (aka blob) or merely have a
(random) filename in the DB and store the file within the file system?
--
Ben
|
|
| Back to top |
|
 |
John Cooper Guest
|
Posted: Mon Oct 03, 2005 7:34 pm Post subject: Re: File Type tips |
|
|
Gray scale is good.
Lossless is a good choice too.
My idea is store all images on a database.
My images will be some personal signatures.
Thanks Ben!
"Ben Hochstrasser" <bhoc@tiscali123^H^H^H.ch> escreveu na mensagem
news:Xns96E4D58EF7839bhoc (AT) 207 (DOT) 105.83.66...
| Quote: | John Cooper wrote:
My images will be black an white.
Black and white (1 bit) or grayscale (8 bit)? Loss (jpeg) or lossless
(PNG/TIF/PCX etc)?
Do you want them to store within the DB file (aka blob) or merely have a
(random) filename in the DB and store the file within the file system?
--
Ben
|
|
|
| Back to top |
|
 |
GrandmasterB Guest
|
Posted: Mon Oct 03, 2005 7:47 pm Post subject: Re: File Type tips |
|
|
"John Cooper" <john.n.cooper (AT) gmail (DOT) com> wrote
| Quote: | I need some tips to write image files on database.
I need some information some the best file type, colors, compression,
quality, etc...
My images will be black an white.
Can anyone help me?
|
I dont think the db will care one way or another what file type you use.
Its all binary data to the db. It'd be better to select a file type based
on what you're using the image for in the end.
That being said, unless you have a particularly good reason that you
specifically *need* to store the file in the db itself, I'd recommend NOT
doing so. Rather, store the image as a file on disk, and then just create
records in your database that point to the file in your db.
One easy way to do it is if you have a 'files' table, use the unique
identifier for each row as part of the file name that applies to that
record. The row with an id of 133 would map to 133.tif, for example. A
better way, as someone else already mentioned, is to use a unique random
string or hash to point to the file.
|
|
| Back to top |
|
 |
Ben Hochstrasser Guest
|
Posted: Mon Oct 03, 2005 7:50 pm Post subject: Re: File Type tips |
|
|
John Cooper wrote:
| Quote: | Gray scale is good.
Lossless is a good choice too.
My idea is store all images on a database.
My images will be some personal signatures.
|
Take PNG.
--
Ben
|
|
| Back to top |
|
 |
John Cooper Guest
|
Posted: Mon Oct 03, 2005 7:58 pm Post subject: Re: File Type tips |
|
|
Thank Ben
I will try it!
"Ben Hochstrasser" <bhoc@tiscali123^H^H^H.ch> escreveu na mensagem
news:Xns96E4DE2EEC4CCbhoc (AT) 207 (DOT) 105.83.66...
| Quote: | John Cooper wrote:
Gray scale is good.
Lossless is a good choice too.
My idea is store all images on a database.
My images will be some personal signatures.
Take PNG.
--
Ben
|
|
|
| Back to top |
|
 |
John Cooper Guest
|
Posted: Mon Oct 03, 2005 8:18 pm Post subject: Re: File Type tips |
|
|
But in this case, some user can accidentally delete some file.
"GrandmasterB" <Fizzle (AT) shizzle (DOT) com> escreveu na mensagem
news:43418a0d$1 (AT) newsgroups (DOT) borland.com...
| Quote: |
"John Cooper" <john.n.cooper (AT) gmail (DOT) com> wrote in message
news:4341727f (AT) newsgroups (DOT) borland.com...
I need some tips to write image files on database.
I need some information some the best file type, colors, compression,
quality, etc...
My images will be black an white.
Can anyone help me?
I dont think the db will care one way or another what file type you use.
Its all binary data to the db. It'd be better to select a file type based
on what you're using the image for in the end.
That being said, unless you have a particularly good reason that you
specifically *need* to store the file in the db itself, I'd recommend NOT
doing so. Rather, store the image as a file on disk, and then just create
records in your database that point to the file in your db.
One easy way to do it is if you have a 'files' table, use the unique
identifier for each row as part of the file name that applies to that
record. The row with an id of 133 would map to 133.tif, for example. A
better way, as someone else already mentioned, is to use a unique random
string or hash to point to the file.
|
|
|
| Back to top |
|
 |
Ben Hochstrasser Guest
|
Posted: Mon Oct 03, 2005 8:24 pm Post subject: Re: File Type tips |
|
|
John Cooper wrote:
| Quote: | But in this case, some user can accidentally delete some file.
|
That's what we have NTFS for...
--
Ben
|
|
| Back to top |
|
 |
GrandmasterB Guest
|
Posted: Mon Oct 03, 2005 8:36 pm Post subject: Re: File Type tips |
|
|
"John Cooper" <john.n.cooper (AT) gmail (DOT) com> wrote
| Quote: | But in this case, some user can accidentally delete some file.
|
Some user can accidentally delete the database file, or delete the
executable itself. So what? You asked a very vague question and didnt give
any indication about where the images were coming from, in what way the
images were being used, the quantity of them, etc. So you got a generic
answer. I've designed large scale document imaging systems - we're talking
tracking in the hundreds of millions of documents and other files. So I was
offering a lesson I learned from doing that.
|
|
| Back to top |
|
 |
John Cooper Guest
|
Posted: Mon Oct 03, 2005 8:50 pm Post subject: Re: File Type tips |
|
|
Ben tell me a tip to save my images on a file system. Then, my last question
is about this, if a user accidentally delete some file saved on the file
system.
Maybe I have about 10.000 images. I want to save on the database basically
by security and backup questions.
Thanks again
"GrandmasterB" <Fizzle (AT) shizzle (DOT) com> escreveu na mensagem
news:434195d7$1 (AT) newsgroups (DOT) borland.com...
| Quote: | "John Cooper" <john.n.cooper (AT) gmail (DOT) com> wrote in message
news:4341912c (AT) newsgroups (DOT) borland.com...
But in this case, some user can accidentally delete some file.
Some user can accidentally delete the database file, or delete the
executable itself. So what? You asked a very vague question and didnt
give any indication about where the images were coming from, in what way
the images were being used, the quantity of them, etc. So you got a
generic answer. I've designed large scale document imaging systems -
we're talking tracking in the hundreds of millions of documents and other
files. So I was offering a lesson I learned from doing that.
|
|
|
| Back to top |
|
 |
Ben Hochstrasser Guest
|
Posted: Mon Oct 03, 2005 10:18 pm Post subject: Re: File Type tips |
|
|
John Cooper wrote:
| Quote: | Ben tell me a tip to save my images on a file system. Then, my last
question is about this, if a user accidentally delete some file saved
on the file system.
Maybe I have about 10.000 images. I want to save on the database
basically by security and backup questions.
|
Why don't you make use of the NTFS security? Give the user readonly access
and the admins even less. ;-)
--
Ben
|
|
| Back to top |
|
 |
Rick Francken Guest
|
Posted: Tue Oct 04, 2005 2:22 am Post subject: Re: File Type tips |
|
|
"Ben Hochstrasser" wrote in message
| Quote: |
Why don't you make use of the NTFS security? Give the user readonly access
and the admins even less.
|
LOL!
|
|
| Back to top |
|
 |
Marc Pelletier Guest
|
Posted: Tue Oct 04, 2005 2:30 pm Post subject: Re: File Type tips |
|
|
"John Cooper" <john.n.cooper (AT) gmail (DOT) com> wrote in
news:434186db (AT) newsgroups (DOT) borland.com:
| Quote: | My images will be some personal signatures.
|
John,
This is a bit of a digression, but at a previous employer we had to capture
signatures from one of those pen pads that couriers use. Filesize was a
major issue. One of my coworkers came up with the idea of simply capturing
the mouse commands that are triggered when the person signs. It was
obviously an exact copy of the signature, and was way less data.
A very elegant solution, I wish I could claim it was mine!
cheers
Marc Pelletier
|
|
| Back to top |
|
 |
Jens Gruschel Guest
|
Posted: Tue Oct 04, 2005 4:35 pm Post subject: Re: File Type tips |
|
|
| Quote: | This is a bit of a digression, but at a previous employer we had to capture
signatures from one of those pen pads that couriers use. Filesize was a
major issue. One of my coworkers came up with the idea of simply capturing
the mouse commands that are triggered when the person signs. It was
obviously an exact copy of the signature, and was way less data.
A very elegant solution, I wish I could claim it was mine!
|
Just a bit more off topic...
It's similar to character recogition on PDAs. It's much simpler to use
follow the pen than trying to recognize the characters from the image
drawn with the pen.
Jens
--
Jens Gruschel
http://www.pegtop.net
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|