Documentation ¶
Index ¶
- Constants
- func ConvertImageToJPG(originalFilename string, jpgFilename string)
- func ConvertPNGToJPG(pngFilename string, jpgFilename string)
- func GetMediaType(filename string) string
- func GetPhotoRotation(fullFilePath string) float64
- func IsValidMediaType(filename string) bool
- func NormalizedExt(fileName string) string
- func UpdateMobilePhotoWithEXIF(photo *entity.Photo, info map[string]interface{})
- func UpdatePhotoRotation(fullFilePath string)
- func UpdatePhotoWithEXIF(photo *entity.Photo, file *os.File)
Constants ¶
const ( MimeTypeJpeg = "image/jpeg" MimeTypePng = "image/png" MimeTypeGif = "image/gif" MimeTypeBitmap = "image/bmp" MimeTypeTiff = "image/tiff" MimeTypeHEIF = "image/heif" MimeTypeQuickTime = "video/quicktime" MimeTypeMp4 = "video/mp4" )
These constants define the common MIME types of data MIME type is a label used to identify a type of data and allows tidepod to transcode different types of media
Variables ¶
This section is empty.
Functions ¶
func ConvertImageToJPG ¶
ConvertImageToJPG converts a tif image to a jpg image
func ConvertPNGToJPG ¶
ConvertPNGToJPG converts a tif image to a jpg image
func GetMediaType ¶
GetMediaType returns "photo" or "video" depending on the type of file
func GetPhotoRotation ¶
GetPhotoRotation reads the EXIF data and returns the rotation angle of the photo
func IsValidMediaType ¶
IsValidMediaType returns true if the file is either a photo or video
func NormalizedExt ¶
NormalizedExt returns the file extension without dot and in lowercase.
func UpdateMobilePhotoWithEXIF ¶
UpdateMobilePhotoWithEXIF extracts EXIF information from the info JSON object. Updates database entry appropriately with this information
func UpdatePhotoRotation ¶
func UpdatePhotoRotation(fullFilePath string)
UpdatePhotoRotation checks the photo for rotation inconsistencies and rotates the image appropriately
Types ¶
This section is empty.