SDWebImage / SDWebImageSwiftUI

SwiftUI Image loading and Animation framework powered by SDWebImage
https://sdwebimage.github.io/SDWebImageSwiftUI
MIT License
2.14k stars 219 forks source link

Background Color #199

Open zwirne opened 2 years ago

zwirne commented 2 years ago

Hello,

I'm using the following code to display an .png-file but am not able to remove the yellow background and the warning sign. Could you please help me with that issue?

` WebImage(url: URL(string: "https://www.pngall.com/wp-content/uploads/2/Exam-PNG-Pic.png"))

        // Supports options and context, like `.delayPlaceholder` to show placeholder only when error
        .onSuccess { image, data, cacheType in
            // Success
            // Note: Data exist only when queried from disk cache or network. Use `.queryMemoryData` if you really need data
        }

        .resizable() // Resizable like SwiftUI.Image, you must use this modifier or the view will use the image bitmap size

        .placeholder(Image("placeholder")) // Placeholder Image

        // Supports ViewBuilder as well
        .placeholder {
            Rectangle().foregroundColor(.gray)
        }

        .indicator(.activity) // Activity Indicator

        .transition(.fade(duration: 0.5)) // Fade Transition with duration

        .aspectRatio(1, contentMode: .fit)

        .background(Color.black)

        .foregroundColor(Color.black)

`

IMG_FE09EB80D5C0-1