Closed oliverpool closed 6 years ago
Hi,
OK, let's add this function. Could you please send a pull request?
I think we should also do strings.TrimPrefix(ext, ".")
in addition to strings.ToLower
in FormatFromExtension
and fix the formatFromExt
map, to accept both ".jpeg" and "jpeg".
Hi,
first of all, thank for this great package!
img, format, err := image.Decode(r)
) and I want to save it using theimaging.Encode
method.format
.FormatFromFilename
helper, which however does not work if fed with theformat
that I previously got (I currently doimaging.FormatFromFilename("fake." + format)
).I suggest to add the following: