我想顯示一個JPEG圖像,因爲它下載像this library但它的IOS有這樣的東西在android中。在ImageView中顯示隔行(逐行)圖像android
雖然R & D發現this但它也爲ios。
1)現在我使用this way加載它的工作,但開銷是我必須加載兩次。
2)還用壁畫與.setProgressiveRenderingEnabled(true)
但didt通知任何重大變化。
我想顯示一個JPEG圖像,因爲它下載像this library但它的IOS有這樣的東西在android中。在ImageView中顯示隔行(逐行)圖像android
雖然R & D發現this但它也爲ios。
1)現在我使用this way加載它的工作,但開銷是我必須加載兩次。
2)還用壁畫與.setProgressiveRenderingEnabled(true)
但didt通知任何重大變化。
首先,您需要確保您的jpeg支持漸進。 Here's how
加載漸進式JPEG的最簡單方法是使用Fresco。但是你需要extra configuration來做到這一點。
以下是加載漸進式JPEG的最簡單的代碼片段。
ImageRequest request = ImageRequestBuilder
.newBuilderWithSource(Uri.parse("http://pooyak.com/p/progjpeg/jpegload.cgi?o=1"))
.setProgressiveRenderingEnabled(true)
.build();
DraweeController controller = Fresco.newDraweeControllerBuilder()
.setImageRequest(request)
.setOldController(imageView.getController())
.build();
imageView.setController(controller);
// imageView is fresco SimpleDraweeView
祝你好運!
我已經試過這個問題。 –
@SohailZahid你確定嗎?我使用確切的源代碼,它工作得很好。你的圖片網址又是什麼? – aldok
請參閱https://github.com/square/picasso/issues/1544 –
讓我知道你是否成功了。謝謝 –