diff --git a/CHANGES.md b/CHANGES.md index e42430339..56bd21ba7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -36,6 +36,7 @@ - Disables buttons in view mode for users without permissions [Taiga #1328](https://tree.taiga.io/project/penpot/issue/1328) - Fix broken profile and profile options form. +- Fix calculate size of some animated gifs [Taiga #1487](https://tree.taiga.io/project/penpot/issue/1487) - Fix error with the "Navigate to" button on prototypes [Taiga #1268](https://tree.taiga.io/project/penpot/issue/1268) - Fix issue when undo after changing the artboard of a shape [Taiga #1304](https://tree.taiga.io/project/penpot/issue/1304) - Fix issue with typographies panel cannot be collapsed [#707](https://github.com/penpot/penpot/issues/707) diff --git a/backend/src/app/media.clj b/backend/src/app/media.clj index 13219f23a..211257b0d 100644 --- a/backend/src/app/media.clj +++ b/backend/src/app/media.clj @@ -157,8 +157,11 @@ :code :media-type-mismatch :hint (str "Seems like you are uploading a file whose content does not match the extension." "Expected: " mtype ". Got: " mtype'))) - {:width (.getImageWidth instance) - :height (.getImageHeight instance) + ;; For an animated GIF, getImageWidth/Height returns the delta size of one frame (if no frame given + ;; it returns size of the last one), whereas getPageWidth/Height always return the full size of + ;; any frame. + {:width (.getPageWidth instance) + :height (.getPageHeight instance) :mtype mtype})))) (defmethod process :default