Project

General

Profile

Feature #7359

Add support for .svg and .webp image formats

Added by Imanol Losada about 4 years ago. Updated about 3 years ago.

Status:
Assigned
Priority:
Normal
Assignee:
Category:
Global / Others / Misc
Target version:
Start date:
29/10/2014
Due date:
% Done:

30%

Estimated time:
2.00 h
Spent time:
Complexity:
Easy
SCRUM pts - complexity:
3

Description

Chamilo is able to support several image formats (jpg, jpeg, png and gif) which is not bad but a little restricted. Image formats like .svg and .webp are becoming more and more accepted and it would be a good idea to add support for them.

This task is related to #5637, which already implements a tiny support of these image formats.

Associated revisions

Revision d8b40b47 (diff)
Added by Yannick Warnier almost 4 years ago

Implement optional use of SVG icons. Only enabled in test-server mode for now - refs #7359

Revision 8f2d553c (diff)
Added by Yannick Warnier almost 4 years ago

Implement optional use of SVG icons. Only enabled in test-server mode for now - Remove left-out error logs - refs #7359

Revision ff7ee359 (diff)
Added by Yannick Warnier over 3 years ago

Update SVG icons to match design conventions - refs #7359

Revision bc67fd6e (diff)
Added by Yannick Warnier over 3 years ago

Fix icon size for SVG support - refs #7359

Revision 90fdfa31 (diff)
Added by Yannick Warnier over 3 years ago

Add blackboard icons in SVG format - refs #7359

Revision 0173398f (diff)
Added by Yannick Warnier over 3 years ago

Add more icons in SVG format - refs #7359

Revision e1b79437 (diff)
Added by Yannick Warnier over 3 years ago

Fix icon size for SVG support - refs #7359

History

#1

Updated by Yannick Warnier about 4 years ago

  • Target version changed from 1.9.10 to 1.10.0
#2

Updated by Yannick Warnier almost 4 years ago

  • Status changed from New to Assigned
  • Assignee set to Daniel Barreto
  • Estimated time set to 2.00 h
  • Complexity changed from Normal to Easy
  • SCRUM pts - complexity changed from ? to 3

Look for all places when "jpg" and "png" are on the same line in the code, and you should get a good idea of what to change.

Normally, there's a new function/constant somewhere with a list of all image types that are considered images by Chamilo. Ideally, this task should serve to ensure that we have only one place in the code where this list is available.

Also check that video types include .webm (this should be the exact same process)

#3

Updated by Yannick Warnier almost 4 years ago

  • Assignee changed from Daniel Barreto to Alex Aragon
  • Target version changed from 1.10.0 to 2.0
  • % Done changed from 0 to 30

I added code to test this in Display::return_icon(), but it is only enabled when Chamilo is in test server mode. It works particularly well in the exercise edition, when looking at the question type icons.

I'm moving this to 2.0 because it requires much more work to produce more icons in SVG format.

Alex: necesitamos más iconos en formato SVG para empezar a usar esta funcionalidad, que aparece solamente en modo de servidor de prueba.

#5

Updated by Yannick Warnier over 3 years ago

Added many SVG icons in https://github.com/chamilo/chamilo-lms/commit/1514f2c4a3b7b446961b258b6c3f9befb2809d23 and https://github.com/chamilo/chamilo-lms/commit/bcdb1231954a32207940a876550e01d494b9b3b4
Still missing a lot.
Some SVG icons tend to distort on display.
Icons need a grey version for _na suffix icons (can we do that in SVG through a simple command?)

#6

Updated by Yannick Warnier over 3 years ago

Idea for greyscale (once we get the time to work on this to remove all _na styles) http://labs.voronianski.com/css3-grayscale/

#7

Updated by Alex Aragon about 3 years ago

Linea para convertir tu iconos svg a escala de grises.

inkscape -f teacher_na.svg --verb EditSelectAll --verb org.inkscape.color.desaturate.noprefs --verb FileSave --verb FileQuit

Also available in: Atom PDF