ariselseng / camerarawpreviews

Camera Raw Previews app for Nextcloud
GNU Affero General Public License v3.0
53 stars 11 forks source link

Add support for Imaginary #92

Open enoch85 opened 1 year ago

enoch85 commented 1 year ago

Nextcloud recently move towards Imaginary, and it would be great if this app could support that instead of Imagick.

https://github.com/nextcloud/server/issues/13099 https://okxo.de/speed-up-nextcloud-preview-generation-with-imaginary/ https://github.com/nextcloud/vm/blob/master/apps/imaginary.sh

ariselseng commented 1 year ago

Imagick is optional and only used for embedded TIFF previews.

enoch85 commented 1 year ago

Still, think that Imagick should be replaced with Imaginary since that's where Nextcloud is going in general. :)

ariselseng commented 1 year ago

@enoch85 With Imaginary, the previews is not cached in Nextcloud appdata. Is that correct? I see that the default server/lib/private/Preview/Imaginary.php does not support tiff.

It would be awesome if Imaginary could support raw files (maybe it can via extensions ?). Then this app could even fallback to Imaginary for raw files without an embedded jpeg file. There is always files that does have a preview, and a fallback to a http service to actually convert the raw image to jpg would be so nice. Then this app would be complete and actually work for all raw files. An idea I just got would be to setup a docker container, similar to imaginary, but with a simple http service that would call cli commands (or using some library) to convert the raw image to jpg and serve it.

enoch85 commented 1 year ago

With Imaginary, the previews is not cached in Nextcloud appdata. Is that correct?

It is. All the previews that are generated are done so on the fly, but then saved in cache for later use.

An idea I just got would be to setup a docker container, similar to imaginary, but with a simple http service that would call cli commands (or using some library) to convert the raw image to jpg and serve it.

That sounds great!

Maybe even better would be to talk to the core team devs of Nextcloud and make it happen in the actual core? Also cc @szaimen on this.

szaimen commented 1 year ago

An idea I just got would be to setup a docker container, similar to imaginary, but with a simple http service that would call cli commands (or using some library) to convert the raw image to jpg and serve it.

That sounds great!

I am not sure about imaginary's capabilities but possibly it could also convert raw files into jpeg? Did not investigate yet. Depends on the supported image formats...

ariselseng commented 1 year ago

Maybe even better would be to talk to the core team devs of Nextcloud and make it happen in the actual core? Also cc @szaimen on this.

You mean having a provider that can connect to this http service, just like done for Imaginary in core?

enoch85 commented 1 year ago

Maybe even better would be to talk to the core team devs of Nextcloud and make it happen in the actual core? Also cc @szaimen on this.

You mean having a provider that can connect to this http service, just like done for Imaginary in core?

Yeah something like that. Or would it possible to contribute to Imaginary to support RAW? Better to have one service than several, and since Imaginary now is the new "standard", maybe that would be the way forward?

dewi-ny-je commented 1 year ago

I found this ticket while looking for imagick in Nextcloud Snap, which does not provide it by default and therefore makes it impossible for me to use the related feature. The reason why imagick is not provided anymore is that it has a terrible history of security, so replacing it completely or at least stopping using it should be considered: https://github.com/nextcloud-snap/nextcloud-snap/issues/882

ariselseng commented 1 year ago

@dewi-ny-je Most of this apps functionality works with gd and imagick is not a requirement.

Forza-tng commented 4 months ago

AFAIK, Imaginary does not support any raw formats such as DNG, CR2 or NEF. However, would it be possible to use this app as a filter that sends a tiff/PNG file to Imaginary for image preview generation?