MM-14030 Add format and frame count to image metadata (#10757)

* MM-14030 Add initial CountFrames

* MM-14030 Add format and frame count to image metadata

* Fix tests and stop using image dimensions from OpenGraph

* Fix copyright header

* Move license to NOTICE.txt
Этот коммит содержится в:
Harrison Healey
2019-04-30 16:45:26 -04:00
коммит произвёл GitHub
родитель 9a9d5d4081
Коммит e50b642e43
7 изменённых файлов: 712 добавлений и 77 удалений

Просмотреть файл

@@ -31,6 +31,12 @@ type PostMetadata struct {
type PostImage struct {
Width int `json:"width"`
Height int `json:"height"`
// Format is the name of the image format as used by image/go such as "png", "gif", or "jpeg".
Format string `json:"format"`
// FrameCount stores the number of frames in this image, if it is an animated gif. It will be 0 for other formats.
FrameCount int `json:"frame_count"`
}
func (o *PostImage) ToJson() string {