Alamofire / AlamofireImage

AlamofireImage is an image component library for Alamofire
MIT License
3.99k stars 523 forks source link

Native support for Jpeg2000 #428

Closed david-spaeth closed 3 years ago

david-spaeth commented 4 years ago

What did you do?

I try load a Jpeg200 image. The content-type of response is image/jp2

What did you expect to happen?

A succes operation without need to call Data Request.addAcceptableImage ContentTypes(Set<String>(["image/jp2"]))

What happened instead?

A failure with :

failure : AFError
    ▿ responseValidationFailed : 1 element
      ▿ reason : ResponseValidationFailureReason
        ▿ unacceptableContentType : 2 elements
          ▿ acceptableContentTypes : 11 elements
            - 0 : "image/png"
            - 1 : "image/x-xbitmap"
            - 2 : "image/tiff"
            - 3 : "image/gif"
            - 4 : "image/x-icon"
            - 5 : "image/x-bmp"
            - 6 : "image/bmp"
            - 7 : "image/x-win-bitmap"
            - 8 : "image/x-ms-bmp"
            - 9 : "image/jpeg"
            - 10 : "image/ico"
          - responseContentType : "image/jp2"

Alamofire Environment

Alamofire version: 3.6.0 Xcode version: 12.0 Swift version: 5.2 Platform(s) running AlamofireImage: macOS version running Xcode: 10.15.6

jshier commented 3 years ago

This has been released as part of 4.2.0.