• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Saving images to MySQL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving images to MySQL


  • Subject: Re: Saving images to MySQL
  • From: Ryan Britton <email@hidden>
  • Date: Tue, 24 Jul 2007 11:38:14 -0700

When I did this, it was an attempt at the gallery. I stored thumbnails (~20k) and full-size images (800 pixels max dimension, ~150k). Retrieving them from the database was, on average, about 10x slower than retrieving them from disk.

I have not tried binary/varbinary fields. The version of MySQL was the 4.1.x series.



On Jul 23, 2007, at 10:46 PM, Bas Scheffers wrote:

How large is "large"? And what about using varbinary instead of blobs? Surely that can deal with small images? (like 10-100K)

On 24 Jul 2007, at 07:39, Ryan Britton wrote:

I've done this before with another language. MySQL is VERY slow with large BLOBs. I'd recommend storing a path to a file somewhere instead.


On Jul 22, 2007, at 3:11 AM, Michael de Vries wrote:

For my first program I am trying to write in Cocoa I need to save images of products to a MySQL database.
I already have a connection to the database and I can send all information of a product to the database and retrieve it, but I don't know how to handle images.
I have searched google, but I have not found any good solutions or example code.


Probably I have to convert my NSImage to some sort of string representation and then save it to a BLOB field in the database, but how do I represent an image as a string?
And at least as important, how do I create an image of it when I retrieve this data from the database?


Am I thinking in the right direction, or should I handle things differently?

Tnx in advance, Michael
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Saving images to MySQL (From: Michael de Vries <email@hidden>)
 >Re: Saving images to MySQL (From: Ryan Britton <email@hidden>)
 >Re: Saving images to MySQL (From: Bas Scheffers <email@hidden>)

  • Prev by Date: Re: Complete Filename Searching
  • Next by Date: Cancelling a window move
  • Previous by thread: Re: Saving images to MySQL
  • Next by thread: Re: Saving images to MySQL
  • Index(es):
    • Date
    • Thread