peclik / clipboard_image_paste

Redmine plugin for pasting cropped image from clipboard as an attachment.
264 stars 118 forks source link

Why this plugin's image can't be exported in wiki PDF #24

Closed cobub closed 11 years ago

cobub commented 11 years ago

I've install clipboard_image_paste plugin in redmine.

And I add image in wiki page through two ways:

  1. upload file
  2. paste to plugin

Both images are display successfully in wiki page, but when I export PDF, only the image I uploaded displayed, the image by this plugin not display. Is it a different ways to load and display the images for clipboard_image_paste plugin?

peclik commented 11 years ago

I guess you are uploading .jpg file. PDF export works fine with .jpg Plugins stores images in .png. There are some issues in export with certain .png formats, see http://www.redmine.org/issues/14599

cobub commented 11 years ago

You mean that the image will plugins stored can not be exported in wiki PDF?

peclik commented 11 years ago

At the moment probably no.

cobub commented 11 years ago

But I'd tried upload a png file to wiki, and it displays correctly in exported PDF file.

peclik commented 11 years ago

Can you please attach the png? What version of Redmine and www browser do you have?

cobub commented 11 years ago

This is my environments:

Browser:    Google Chrome, Firefox 
Environment:
  Redmine version                          2.2.3.stable.11535
  Ruby version                             1.9.3 (x86_64-linux)
  Rails version                            3.2.12
  Environment                              production
  Database adapter                         Mysql2
Redmine plugins:
  clipboard_image_paste                    1.7

This is the test png file test

I've add it to wiki page, like this: wikipage

And click export wiki, and the pdf like this: pdf

cobub commented 11 years ago

any progress about it?

danjw commented 11 years ago

How do you get this result? I tried it with the plugin and any picture will be a png with alpha channel, png´s with alpah channel are not supported for pdf export.

http://www.redmine.org/issues/12447

peclik commented 11 years ago

Because he has uploaded the picture through "Add attachment" command, not through the plugin. The PNG has not alpha channel so, it's working. Cobub, probably there's solution, I will check that.

danjw commented 11 years ago

Maybe you implement a "convert --alpha off" into the image upload???

peclik commented 11 years ago

Yes, that could be a way.

cobub commented 11 years ago

Maybe it's useful. I'll try the new version if it's ready

peclik commented 11 years ago

Implemented in master, you can try that (requires RMagick gem installed).

danjw commented 11 years ago

Wow, very quick response. Works now great, thanks a lot !!!!

cobub commented 11 years ago

It seems OK. Thanks for you! That will be more convinient to use this plugin.

jwalkerbg commented 11 years ago

Will this be released as new version (in Redmine plugins directory) ?

peclik commented 11 years ago

Yes, soon it will.