|
|
|
@ -106,15 +106,15 @@ func IsImageTypeSupportedByVips(t ImageType) bool {
|
|
|
|
imageMutex.RLock()
|
|
|
|
imageMutex.RLock()
|
|
|
|
|
|
|
|
|
|
|
|
// Discover supported image types and cache the result
|
|
|
|
// Discover supported image types and cache the result
|
|
|
|
itShouldDiscovery := len(SupportedImageTypes) == 0
|
|
|
|
itShouldDiscover := len(SupportedImageTypes) == 0
|
|
|
|
if itShouldDiscovery {
|
|
|
|
if itShouldDiscover {
|
|
|
|
imageMutex.RUnlock()
|
|
|
|
imageMutex.RUnlock()
|
|
|
|
discoverSupportedImageTypes()
|
|
|
|
discoverSupportedImageTypes()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Check if image type is actually supported
|
|
|
|
// Check if image type is actually supported
|
|
|
|
isSupported, ok := SupportedImageTypes[t]
|
|
|
|
isSupported, ok := SupportedImageTypes[t]
|
|
|
|
if !itShouldDiscovery {
|
|
|
|
if !itShouldDiscover {
|
|
|
|
imageMutex.RUnlock()
|
|
|
|
imageMutex.RUnlock()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|