If i'm not mistaken, magic quotes only apply to Get, Cookie, and Post. If you are reading data from a digital image, magic quotes would not apply there. Meta data in an image could easily contain quotes or other malicious bits.
You should ALWAYS escape user input of any kind before inserting data into a database. Also, [man]addslashes[/man] isn't completely safe for this purpose because their might be other characters not handled by addslashes that are still considered a quote mark by addslashes. A backquote or other UTF-8 character, for example (`). Instead of addslashes, you should use the escape function provided by any database connection technology. MySQL offers [man]mysql_real_escape_string[/man] for instance. PostGreSQL has [man]pg_escape_string[/man].