camerarawpreviews icon indicating copy to clipboard operation
camerarawpreviews copied to clipboard

Add supoort to (pre)view HEIC images

Open Litr-tm opened this issue 2 years ago • 3 comments

This patch adds HEIC support to camerarawpreviews (I have no time to create pull request) camerarawpreviews-heic.patch.txt

Litr-tm avatar May 24 '22 18:05 Litr-tm

I can push up a PR, applying this patch if needed 👍

Jordan-Work avatar Jul 07 '22 22:07 Jordan-Work

@Jordan-Work Feel free to contribute. Make sure the code is readable and does not break any thing. Especially for users that do not have imagick extension installed.

ariselseng avatar Jul 08 '22 18:07 ariselseng

@Jordan-Work @Litr-tm @Webbeh https://github.com/ariselseng/camerarawpreviews/releases/tag/v0.8.0 Care to test this tarball before I put it on the nextcloud app store?

ariselseng avatar Aug 01 '22 10:08 ariselseng

@ariselseng Works well. No errors/warnings reported

Litr-tm avatar Aug 12 '22 12:08 Litr-tm

Released in the nextcloud app store.

ariselseng avatar Aug 14 '22 11:08 ariselseng

What exactly does that patch do? Maybe I'm just understanding it wrong, but HEIC previews are generated natively in Nextcloud for some time now if enabling the "HEIC" preview provider, also see this old issue here: https://github.com/ariselseng/camerarawpreviews/issues/22

justsomescripts avatar Aug 20 '22 13:08 justsomescripts

@justsomescripts As far I know, the heic support was dropped from nextcloud recently. Do you have working heic support on latest nextcloud?

ariselseng avatar Aug 20 '22 14:08 ariselseng

@justsomescripts As far I know, the heic support was dropped from nextcloud recently. Do you have working heic support on latest nextcloud?

Couldn't find anything that implies that it's been deprecated. I'm running NC 24.0.4 and have HEIC previews without problems. Running the TrueCharts version on TrueNAS Scale, but as far as I can tell there are no modifications to preview generation there (besides previewgenerator being installed by default) so it should also work on a standard setup. Config for reference:

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'nextcloud-redis',
    'password' => '****************************',
    'port' => 6379,
  ),
  'trusted_proxies' => 
  array (
    0 => '172.16.0.0/16',
    1 => '127.0.0.1',
  ),
  'passwordsalt' => '***********************',
  'secret' => '******************',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'test.fakedomain.dns',
    2 => 'localhost',
    3 => '127.0.0.1',
    4 => '127.0.0.1:10020',
    5 => '192.168.178.14',
    6 => 'nextcloud-nextcloud',
    7 => 'nextcloud-nextcloud-backend',
    8 => '****************',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'pgsql',
  'version' => '24.0.4.1',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextcloud',
  'dbhost' => 'nextcloud-postgresql',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => '***********************',
  'installed' => true,
  'instanceid' => '******',
  'preview_imaginary_url' => 'http://127.0.0.1:9090',
  'preview_max_x' => '4096',
  'preview_max_y' => '4096',
  'preview_max_memory' => '512',
  'preview_max_filesize_image' => '150',
  'default_phone_region' => '**',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => '************',
  'mail_domain' => '**********',
  'mail_smtpauthtype' => 'PLAIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.mailbox.org',
  'mail_smtpport' => '465',
  'mail_smtpname' => '*****************',
  'mail_smtppassword' => '*****************',
  'maintenance' => false,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\Imaginary',
    1 => 'OC\\Preview\\PNG',
    2 => 'OC\\Preview\\JPEG',
    3 => 'OC\\Preview\\GIF',
    4 => 'OC\\Preview\\HEIC',
    5 => 'OC\\Preview\\Movie',
  ),
);

Note that I have Imaginary enabled which also generates HEIC previews, but tried without and that worked fine too.

justsomescripts avatar Aug 20 '22 14:08 justsomescripts

@Litr-tm Can you comment on this? If there is actual support for heic on latest nextcloud I will definitely drop this from this app.

ariselseng avatar Aug 20 '22 15:08 ariselseng

@ariselseng sorry to comment on this again, but is a removal (or config parameter) planned? Still getting lots of unnecessary errors because of this which makes the app unusable for me and probably others as well. The preview provider 'OC\Preview\HEIC' is available by default so no need for support by this app.

Should I open a new issue?

justsomescripts avatar Jan 29 '23 11:01 justsomescripts

@ariselseng sorry to comment on this again, but is a removal (or config parameter) planned? Still getting lots of unnecessary errors because of this which makes the app unusable for me and probably others as well. The preview provider 'OC\Preview\HEIC' is available by default so no need for support by this app.

Should I open a new issue?

Please open a new issue, or even better a PR that removes it. If HEIC really is supported by Nextcloud now then it certainly should be removed from this app.

ariselseng avatar Jan 29 '23 14:01 ariselseng

Here you go @ariselseng Please note that I'm not a PHP dev, but the changes looked pretty straightforward so I'm sure this works out.

justsomescripts avatar Jan 29 '23 18:01 justsomescripts