You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Hank Knight <hk...@gmail.com> on 2013/11/20 23:36:15 UTC

CouchDB: Automatically resizing images

Here is an example of an image attachment served by CouchDB:
https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg

I would like a CouchDB module that would use ImageMagick to
automatically resize an image based on parameters passed in the URL.
https://github.com/kivra/emagick

For example this should return the same image, sized to 200px by 200px:
https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg/resized/200x200/www/qqq/z.jpg

It should also automatically add the resized image as an attachment so
the next time that URL was requested it would not need to be resized
again.

Do you know if this idea would be technically possible?

Has something like this already been done?

Re: CouchDB: Automatically resizing images

Posted by Benjamin Young <by...@bigbluehat.com>.
That worker list is impressive! :)

Have you explored triggering them via update_notification settings?
http://docs.couchdb.org/en/latest/config/externals.html#config-update-notification

I'm not sure of the pro/con exchanges in this case, but I'd be curious 
to find out! :D

Thanks for building all these great things,
Benjamin

On 11/22/13, 2:53 PM, Johannes Jörg Schmidt wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 22.11.2013 19:29, Ryan Ramage wrote:
>> check out: https://github.com/jo/worker-generate-thumbnails
> This is depricated in favour of https://github.com/null2/worker-convert.
>
>>
>>
>>
>> On Wed, Nov 20, 2013 at 9:08 PM, Alexander Uvarov
>> <de...@electrosystem.ru>wrote:
>>
>>> Try my gist https://gist.github.com/wildchild/407311
>>>
>>> You can run imagemagick, upload thumbs on request and serve
>>> them.
>>>
>>>
>>> On Nov 21, 2013, at 5:52 AM, Hank Knight <hk...@gmail.com>
>>> wrote:
>>>
>>>> I want this to be triggered by the URL when the image is
>>>> requested, not when the image is uploaded.
>>>>
>>>> For example:
>>>>
>>> https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg/resized/201x201/www/qqq/z.jpg
>>>
> https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg/resized/202x202/www/qqq/z.jpg
>>> https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg/resized/203x203/www/qqq/z.jpg
>>>>
> On Wed, Nov 20, 2013 at 6:48 PM, Mark Hahn <ma...@reevuit.com> wrote:
>>>>> I would use a simple node program that "watches" all the
>>>>> image uploads
>>> and
>>>>> then runs imagemagick
>>>>>
>>>>>
>>>>>
>>>>> On Wed, Nov 20, 2013 at 2:36 PM, Hank Knight
>>>>> <hk...@gmail.com>
>>> wrote:
>>>>>> Here is an example of an image attachment served by
>>>>>> CouchDB: https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg
>>>>>>
>>>>>> I would like a CouchDB module that would use ImageMagick
>>>>>> to automatically resize an image based on parameters passed
>>>>>> in the URL. https://github.com/kivra/emagick
>>>>>>
>>>>>> For example this should return the same image, sized to
>>>>>> 200px by 200px:
>>>>>>
>>>>>>
>>> https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg/resized/200x200/www/qqq/z.jpg
>>>>>>
> It should also automatically add the resized image as an attachment so
>>>>>> the next time that URL was requested it would not need to
>>>>>> be resized again.
>>>>>>
>>>>>> Do you know if this idea would be technically possible?
>>>>>>
>>>>>> Has something like this already been done?
>>>>>>
>>>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.22 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQEcBAEBAgAGBQJSj7YmAAoJED+W7gN+c0gcgJsH/jYe+i510mqLRml7rx3k9xnO
> 74S6umfaXrMbFSJIHhd4ht8DjEZGMU+qzUKRwwvJ4S3P85k5cy2xFXBszLfppYLH
> 3Y+Z9MX4n7dvhMU62iA5BBmxZdrTRWMb4WMx1r543eJ2UpcRLoZNUgc6sM7Y0YkZ
> dQJGZxMfS6+EbRXexRiXA8BqZ2ECTQaR6s17qttvtgyka1ofeIC5lKb7QNk7WJgl
> M6bw8GjyOXmJSbJItlmdcQcVxaeNpvwbaoZ93J+HSXuEuHFxpsODSDZ2M7xAig77
> vjgKjoIbrVSIHQoTCFjiIfWhuTspL+3/R8mdDqGuGUYsbuOR2c17STiLMLBpzsQ=
> =4IC7
> -----END PGP SIGNATURE-----


Re: CouchDB: Automatically resizing images

Posted by Johannes Jörg Schmidt <sc...@netzmerk.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 22.11.2013 19:29, Ryan Ramage wrote:
> check out: https://github.com/jo/worker-generate-thumbnails

This is depricated in favour of https://github.com/null2/worker-convert.

> 
> 
> 
> 
> On Wed, Nov 20, 2013 at 9:08 PM, Alexander Uvarov
> <de...@electrosystem.ru>wrote:
> 
>> Try my gist https://gist.github.com/wildchild/407311
>> 
>> You can run imagemagick, upload thumbs on request and serve
>> them.
>> 
>> 
>> On Nov 21, 2013, at 5:52 AM, Hank Knight <hk...@gmail.com>
>> wrote:
>> 
>>> I want this to be triggered by the URL when the image is
>>> requested, not when the image is uploaded.
>>> 
>>> For example:
>>> 
>> https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg/resized/201x201/www/qqq/z.jpg
>>>
>>
>> 
https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg/resized/202x202/www/qqq/z.jpg
>>> 
>> https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg/resized/203x203/www/qqq/z.jpg
>>>
>>>
>> 
On Wed, Nov 20, 2013 at 6:48 PM, Mark Hahn <ma...@reevuit.com> wrote:
>>>> I would use a simple node program that "watches" all the
>>>> image uploads
>> and
>>>> then runs imagemagick
>>>> 
>>>> 
>>>> 
>>>> On Wed, Nov 20, 2013 at 2:36 PM, Hank Knight
>>>> <hk...@gmail.com>
>> wrote:
>>>> 
>>>>> Here is an example of an image attachment served by
>>>>> CouchDB: https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg
>>>>> 
>>>>> I would like a CouchDB module that would use ImageMagick
>>>>> to automatically resize an image based on parameters passed
>>>>> in the URL. https://github.com/kivra/emagick
>>>>> 
>>>>> For example this should return the same image, sized to
>>>>> 200px by 200px:
>>>>> 
>>>>> 
>> https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg/resized/200x200/www/qqq/z.jpg
>>>>>
>>>>>
>> 
It should also automatically add the resized image as an attachment so
>>>>> the next time that URL was requested it would not need to
>>>>> be resized again.
>>>>> 
>>>>> Do you know if this idea would be technically possible?
>>>>> 
>>>>> Has something like this already been done?
>>>>> 
>> 
>> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSj7YmAAoJED+W7gN+c0gcgJsH/jYe+i510mqLRml7rx3k9xnO
74S6umfaXrMbFSJIHhd4ht8DjEZGMU+qzUKRwwvJ4S3P85k5cy2xFXBszLfppYLH
3Y+Z9MX4n7dvhMU62iA5BBmxZdrTRWMb4WMx1r543eJ2UpcRLoZNUgc6sM7Y0YkZ
dQJGZxMfS6+EbRXexRiXA8BqZ2ECTQaR6s17qttvtgyka1ofeIC5lKb7QNk7WJgl
M6bw8GjyOXmJSbJItlmdcQcVxaeNpvwbaoZ93J+HSXuEuHFxpsODSDZ2M7xAig77
vjgKjoIbrVSIHQoTCFjiIfWhuTspL+3/R8mdDqGuGUYsbuOR2c17STiLMLBpzsQ=
=4IC7
-----END PGP SIGNATURE-----

Re: CouchDB: Automatically resizing images

Posted by Ryan Ramage <ry...@gmail.com>.
check out: https://github.com/jo/worker-generate-thumbnails




On Wed, Nov 20, 2013 at 9:08 PM, Alexander Uvarov <de...@electrosystem.ru>wrote:

> Try my gist https://gist.github.com/wildchild/407311
>
> You can run imagemagick, upload thumbs on request and serve them.
>
>
> On Nov 21, 2013, at 5:52 AM, Hank Knight <hk...@gmail.com> wrote:
>
> > I want this to be triggered by the URL when the image is requested,
> > not when the image is uploaded.
> >
> > For example:
> >
> https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg/resized/201x201/www/qqq/z.jpg
> >
> https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg/resized/202x202/www/qqq/z.jpg
> >
> https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg/resized/203x203/www/qqq/z.jpg
> >
> > On Wed, Nov 20, 2013 at 6:48 PM, Mark Hahn <ma...@reevuit.com> wrote:
> >> I would use a simple node program that "watches" all the image uploads
> and
> >> then runs imagemagick
> >>
> >>
> >>
> >> On Wed, Nov 20, 2013 at 2:36 PM, Hank Knight <hk...@gmail.com>
> wrote:
> >>
> >>> Here is an example of an image attachment served by CouchDB:
> >>> https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg
> >>>
> >>> I would like a CouchDB module that would use ImageMagick to
> >>> automatically resize an image based on parameters passed in the URL.
> >>> https://github.com/kivra/emagick
> >>>
> >>> For example this should return the same image, sized to 200px by 200px:
> >>>
> >>>
> https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg/resized/200x200/www/qqq/z.jpg
> >>>
> >>> It should also automatically add the resized image as an attachment so
> >>> the next time that URL was requested it would not need to be resized
> >>> again.
> >>>
> >>> Do you know if this idea would be technically possible?
> >>>
> >>> Has something like this already been done?
> >>>
>
>

Re: CouchDB: Automatically resizing images

Posted by Alexander Uvarov <de...@electrosystem.ru>.
Try my gist https://gist.github.com/wildchild/407311

You can run imagemagick, upload thumbs on request and serve them.


On Nov 21, 2013, at 5:52 AM, Hank Knight <hk...@gmail.com> wrote:

> I want this to be triggered by the URL when the image is requested,
> not when the image is uploaded.
> 
> For example:
> https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg/resized/201x201/www/qqq/z.jpg
> https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg/resized/202x202/www/qqq/z.jpg
> https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg/resized/203x203/www/qqq/z.jpg
> 
> On Wed, Nov 20, 2013 at 6:48 PM, Mark Hahn <ma...@reevuit.com> wrote:
>> I would use a simple node program that "watches" all the image uploads and
>> then runs imagemagick
>> 
>> 
>> 
>> On Wed, Nov 20, 2013 at 2:36 PM, Hank Knight <hk...@gmail.com> wrote:
>> 
>>> Here is an example of an image attachment served by CouchDB:
>>> https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg
>>> 
>>> I would like a CouchDB module that would use ImageMagick to
>>> automatically resize an image based on parameters passed in the URL.
>>> https://github.com/kivra/emagick
>>> 
>>> For example this should return the same image, sized to 200px by 200px:
>>> 
>>> https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg/resized/200x200/www/qqq/z.jpg
>>> 
>>> It should also automatically add the resized image as an attachment so
>>> the next time that URL was requested it would not need to be resized
>>> again.
>>> 
>>> Do you know if this idea would be technically possible?
>>> 
>>> Has something like this already been done?
>>> 


Re: CouchDB: Automatically resizing images

Posted by Hank Knight <hk...@gmail.com>.
I want this to be triggered by the URL when the image is requested,
not when the image is uploaded.

For example:
https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg/resized/201x201/www/qqq/z.jpg
https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg/resized/202x202/www/qqq/z.jpg
https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg/resized/203x203/www/qqq/z.jpg

On Wed, Nov 20, 2013 at 6:48 PM, Mark Hahn <ma...@reevuit.com> wrote:
> I would use a simple node program that "watches" all the image uploads and
> then runs imagemagick
>
>
>
> On Wed, Nov 20, 2013 at 2:36 PM, Hank Knight <hk...@gmail.com> wrote:
>
>> Here is an example of an image attachment served by CouchDB:
>> https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg
>>
>> I would like a CouchDB module that would use ImageMagick to
>> automatically resize an image based on parameters passed in the URL.
>> https://github.com/kivra/emagick
>>
>> For example this should return the same image, sized to 200px by 200px:
>>
>> https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg/resized/200x200/www/qqq/z.jpg
>>
>> It should also automatically add the resized image as an attachment so
>> the next time that URL was requested it would not need to be resized
>> again.
>>
>> Do you know if this idea would be technically possible?
>>
>> Has something like this already been done?
>>

Re: CouchDB: Automatically resizing images

Posted by Mark Hahn <ma...@reevuit.com>.
I would use a simple node program that "watches" all the image uploads and
then runs imagemagick



On Wed, Nov 20, 2013 at 2:36 PM, Hank Knight <hk...@gmail.com> wrote:

> Here is an example of an image attachment served by CouchDB:
> https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg
>
> I would like a CouchDB module that would use ImageMagick to
> automatically resize an image based on parameters passed in the URL.
> https://github.com/kivra/emagick
>
> For example this should return the same image, sized to 200px by 200px:
>
> https://zuhqtr5.couchappy.com/site/www/qqq/z.jpg/resized/200x200/www/qqq/z.jpg
>
> It should also automatically add the resized image as an attachment so
> the next time that URL was requested it would not need to be resized
> again.
>
> Do you know if this idea would be technically possible?
>
> Has something like this already been done?
>