-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PDF thumbnails should be PNG for transparency #1260
Milestone
Comments
Yep, that's totally how it would work. And I can also attest that I've seen
black backgrounds from generated jpegs in the past. 👍 Good suggestion.
…On Sun, Sep 1, 2019, 19:45 J Hunt ***@***.***> wrote:
In my experience, JPEG thumbnails from PDFs often end up with black
backgrounds.
Compare
<https://camo.githubusercontent.com/839e868583a7dc6a9dc13f478172c9c5c0206b92/687474703a2f2f6c6f63616c686f73743a383030302f73697465732f64656661756c742f66696c65732f323031392d30382f322d5468756d626e61696c253230496d6167652e6a7067>
<https://camo.githubusercontent.com/1f788630a530e7e5bf33169ac7cc7c294027f4dd/687474703a2f2f6c6f63616c686f73743a383030302f73697465732f64656661756c742f66696c65732f656164335f6f75747075745f7468756d626e61696c2d302e706e67>
The latter .png was generated on the command line in the VM using
sudo convert -thumbnail x300 -background white -alpha remove
/var/www/html/drupal/EAD3_Implementation_Survey_Results_and_Discussion_20190320.pdf
ead3_output_thumbnail.png
I assume the way to do this is to clone action 'Image - Generate a
thumbnail from an original file', change mimetype to image/png and alter
the contexts so that the original 'Image - Generate a thumbnail from an
original file' action only applies to model=Image, while the new action
applies when model=Document?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1260>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AE6PSHZV6W5YZR45JT64QULQHRA2HANCNFSM4ISYG6SQ>
.
|
langcode: en
status: true
dependencies:
module:
- islandora_image
id: digital_document_generate_a_thumbnail_from_an_original_file
label: 'Digital Document - Generate a thumbnail from an original file'
type: node
plugin: generate_image_derivative
configuration:
queue: islandora-connector-houdini
event: 'Generate Derivative'
source_term_uri: 'http://pcdm.org/use#OriginalFile'
derivative_term_uri: 'http://pcdm.org/use#ThumbnailImage'
mimetype: image/png
args: '-thumbnail 100x100'
destination_media_type: image
scheme: public
path: '[date:custom:Y]-[date:custom:m]/[node:nid]-[term:name].png' This is working for me, manually via admin/content. Next we need to tweak contexts. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In my experience, JPEG thumbnails from PDFs often end up with black backgrounds.
Compare
to
The latter .png was generated on the command line in the VM using
sudo convert -thumbnail x300 -background white -alpha remove /var/www/html/drupal/EAD3_Implementation_Survey_Results_and_Discussion_20190320.pdf ead3_output_thumbnail.png
I assume the way to do this is to clone action 'Image - Generate a thumbnail from an original file', change
mimetype
toimage/png
and alter the contexts so that the original 'Image - Generate a thumbnail from an original file' action only applies to model=Image, while the new action applies when model=Document?The text was updated successfully, but these errors were encountered: