galterlibrary / digital-repository

DigitalHub - Institutional Repository for Galter Health Sciences
https://digitalhub.northwestern.edu/
5 stars 1 forks source link

Some thumbnails are generated with a black background #488

Closed phebal closed 8 years ago

phebal commented 8 years ago

We need to fix the generation problem. Imagemagic is used to convert the pdf. The -resize option causes the black background. Problem is likely due to wrong colorspace being used for documents with CMYK colorspace. This works for example: convert -colorspace cmyk -resize 338x493 StatTag.pdf StatTag.jpg but not if you skip the colorspace directive. Problem is in detecting what colorspace to use.

Once fixed we need to regenerate thumbs for all pdfs at the very least.

vioil commented 8 years ago

if this is fixed, all the pnb copies that are also displaying black will be fixed, right?

phebal commented 8 years ago

Not at this time, this was a manual fix. I have a separate ticket for the root issue that's causing it. Once that's fixed then yes, hopefully.

On Thu, 2016-09-29 at 06:57 -0700, Violeta Ilik wrote:

if this is fixed, all the pnb copies that are also displaying black will be fixed, right?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3Agithub.com_galterlibrary_digital-2Drepository_issues_488-23issuecomment-2D250473342&d=CwMCaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=Z0Svxjhf-qaJXPDWfO58bAYy-qwwObR8ey5b2z1pf6Q&m=AeXV0qVK6EUFrUDTfJpgZ2twpqk_kM0qT8FXTVax6Wg&s=9YdYQz5VjVCSg5p2XYOwuHUPFsvPHN9yVYZSx6sONm0&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3Agithub.com_notifications_unsubscribe-2Dauth_ADFjz4I663N1BDgpqXeT-2Dpf3puNuy1E4ks5qu8PHgaJpZM4KJ-2DmO&d=CwMCaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=Z0Svxjhf-qaJXPDWfO58bAYy-qwwObR8ey5b2z1pf6Q&m=AeXV0qVK6EUFrUDTfJpgZ2twpqk_kM0qT8FXTVax6Wg&s=NorrkxzdUe80XdDjkJR2dtmxzDLxb3zfQCd--s3ZI&e=.

vioil commented 8 years ago

I know this is manually fixed, I am asking, based on your analysis, if all PNB copies can be fixed as well considering what you discovered and think is the cause?

phebal commented 8 years ago

Yes, if (when) I fix the root cause and re-run the derivatives generation process they will be fixed along with any other black-background thumbnails.

On Thu, 2016-09-29 at 07:09 -0700, Violeta Ilik wrote:

I know this is manually fixed, I am asking, based on your analysis, if all PNB copies can be fixed as well considering what you discovered and think is the cause?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3Agithub.com_galterlibrary_digital-2Drepository_issues_488-23issuecomment-2D250476636&d=CwMFaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=Z0Svxjhf-qaJXPDWfO58bAYy-qwwObR8ey5b2z1pf6Q&m=Dyk1B3B7vHw29rpn_pv_GhhCswJrMMxuqoBTp_MEZ6Q&s=xHMKSab_euAwTGdrdJ_anBda6HUyjCnE350ARQuLEdI&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3Agithub.com_notifications_unsubscribe-2Dauth_ADFjz4-2DAQ9YsEM5M89l37-2DKwhXzBuUbcks5qu8aEgaJpZM4KJ-2DmO&d=CwMFaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=Z0Svxjhf-qaJXPDWfO58bAYy-qwwObR8ey5b2z1pf6Q&m=Dyk1B3B7vHw29rpn_pv_GhhCswJrMMxuqoBTp_MEZ6Q&s=Y1z5eUCVGplhJdNmYkMFKuX_8VUXYCYrc2ABi93337Q&e=.

phebal commented 8 years ago

Whoops, I thought we were talking in the #487 ticket, that's why the confused messages. Perils of answering through email.

phebal commented 8 years ago

Found a fix for most cases of black background thumbs but while testing I discovered that there are sill times when we end up with a black bg. I'll investigate for a bit longer but the current fix should be good for > 90% of pdfs.

phebal commented 8 years ago

Fixing this for all images would involve adding -alpha remove commandline option to convert which imagemagic makes it anything but easy. We can talk about it tomorrow, for now I'll stop working on this.

phebal commented 8 years ago

This should be fixed for all pdfs now.