Comments

pivica created an issue. See original summary.

pivica’s picture

StatusFileSize
new2.16 KB

Here is a patch.

pivica’s picture

Status: Active » Needs review
pivica’s picture

StatusFileSize
new1.35 KB
new2.26 KB

@Berdir suggested that we return FALSE if width or height is not defined, adjusted patch for that.

pivica’s picture

Status: Needs review » Needs work

Tested this a bit against various projects logo examples.
Works great but there is a problem, most of the time logo has width and height wihout unit, sometimes in px and sometimes in mm.
Checked SVG specification against it and units are allowed for SVG width and height. But for image element you can specify only values without units.

I guess the service needs to remove units from width and height values when they exist.

pivica’s picture

StatusFileSize
new1.17 KB
new3.05 KB

Here is a new version which removes units.

pivica’s picture

Status: Needs work » Needs review

  • pivica committed cf12fa39 on 8.x-1.x
    Issue #3389133 by pivica: Add service for extraction dimensions from SVG...
pivica’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.