#1488452 closed Bugs (fixed)

*.tif attachments are not displayed properly

Reported by: rosali Owned by:
Priority: 5 Milestone: 0.9-beta
Component: Core functionality Version: 0.7.2
Severity: normal Keywords:
Cc:

Description

Roundcube tries to display *.tif attachments as inline image. Proper display fails.

Steps to reproduce the issue:

  • Attach any *.tif file to a message and view the message in preview pane or in full display mode.

Example email has been sent to ALEC. Please feel free to share the message with other devs, but do not expose private content anywhere in the web, please. Thanks!

Just a reminder; you mentioned in your reply:

"This is a bug c.a. line 1109 of mail/func.inc."

Change History (6)

comment:1 Changed 13 months ago by alec

After some more investigation I'm not sure what we can do about this. There are some browsers supporting tiff images (IE, Safari, Konqueror), there are also some plugins for other browsers. So, we can't just use simple browser detection.

comment:2 Changed 13 months ago by rosali

I would make it not to display *tif(f) attachments inline. Just handle these attachments as "normal" attachments. IMO, that's enough.

comment:3 Changed 13 months ago by alec

There was a request to display .tif images inline - #1486775

comment:4 Changed 13 months ago by alec

It looks that tif support detection isn't so hard. Create a tif image with size 1x1 px.

var img = new Image();
// on browsers without TIF support the onload will be not triggered
img.onload = function() {
    alert('TIF supported');
};
img.onerror = function() {
    alert('TIF not supported');                       
};
img.src = 'empty.tif';

I tested it with Rekonq, Firefox, Chromium, Opera. So, we can detect tif support (once a session) and display tif images when supported. What's more, for other browsers we could use ImageMagick? to convert tif to jpeg.

Last edited 13 months ago by alec (previous) (diff)

comment:5 Changed 12 months ago by alec

  • Milestone changed from 0.8-stable to 0.9-beta

Done in dev-browser-capabilities branch. However I postpone this to 0.9.

comment:6 Changed 12 months ago by alec

  • Resolution set to fixed
  • Status changed from new to closed

Added Tiff to Jpeg conversion. Merged with master.

Note: See TracTickets for help on using tickets.