Arc Forumnew | comments | leaders | submitlogin
3 points by almkglor 6069 days ago | link | parent

> All images should be sized down to a particular maximum size, and flickr style thumbnails should be generated for the gallery view.

Arc has exactly 0 support for this. Maybe add this to TODO list of libraries for Arc?

> How do we tell if the file is not an image?

Check the binary file for each of the common formats?

> What do you do then?

If it's not an image, summarily delete it and tell the user that it didn't match one of the supported formats.

> What if the file is really big, and eats up our bandwidth / disk space?

Set a limit on HTTP PUT or POST. If it exceeds a certain size, complain to the user.

Note however that the Arc Server does not support PUT operations yet.

> Do we have any support for truly temporary files?

/tmp ?

> We wouldn't want one user's file to upload over another, when we're still trying to shrink and process it. How do we avoid orphaning images if users re-upload things?

Tough. Not sure what you exactly mean with this though.

> Should user icons be considered the same sort of thing as gallery images?

Not sure what you mean by this either. What do you mean by "user icons"?

> Should we store anything relating to the images in our database at all?

Database? What database?

LOL.

Arc has 0 database support for that matter.



3 points by kens 6069 days ago | link

What support do you need for image processing beyond (system "ImageMagick ...")?

But seriously, if you're planning to implement an image processing library, take a look at the Common Lisp bindings to ImageMagick: http://common-lisp.net/project/cl-magick/

-----

3 points by almkglor 6069 days ago | link

> What support do you need for image processing beyond (system "ImageMagick ...")?

http://arclanguage.org/item?id=3522

-----

1 point by tiglionabbit 6069 days ago | link

>> We wouldn't want one user's file to upload over another, when we're still trying to shrink and process it. How do we avoid orphaning images if users re-upload things?

>Tough. Not sure what you exactly mean with this though.

This was actually part of the previous point, about temporary files. Many languages have tempfiles in their standard library. These help when you have a lot of users uploading things, and you want to make sure files don't clobber each other before you can decide where to put them. http://docs.python.org/lib/module-tempfile.html http://www.ruby-doc.org/core/classes/Tempfile.html

>> Should user icons be considered the same sort of thing as gallery images?

>Not sure what you mean by this either. What do you mean by "user icons"?

Most forums and art sites let their users upload a little picture, which is placed by each of their comments or posts. The difference between this and a normal image on the site is that, while other pictures may exist in different forms (e.g. full view / original, medium size, and thumbnail), user icons often only show up in one small standard size, and the original image they were shrunken from is not saved.

-----

1 point by sacado 6069 days ago | link

As for database, I think sqlite was almost working last time I looked at it. Maybe it's working now ?

-----