Multiple issues
See original GitHub issueWell, i’ve just been trying to integrate it, so far i’ve found some (outdated?) docs: http://frescolib.org/docs/progressive-jpegs.html#_
PipelineDraweeController controller = Fresco.newControllerBuilder() .setImageRequest(requests)
.setOldController(mSimpleDraweeView.getOldController()) .build();
I had to cast the new controller builder to PipelineDraweeController, getOldController() is not a function defined in DraweeView, i only have ‘getController’. Further to that, i finally got it to compile, only to be given ‘SimpleDraweeView was not initialized!’ I dont see anywhere on the Getting started that i need to do any special initialization other than the usual view finding? edit Changing to a plain ‘DraweeView’ stopped the crash however, I’m also not sure how to actually start the image load?
ProgressiveJpegConfig pjpegConfig = new ProgressiveJpegConfig() {
@Override
public int getNextScanNumberToDecode(int scanNumber) {
return scanNumber + 2;
}
public QualityInfo getQualityInfo(int scanNumber) {
boolean isGoodEnough = (scanNumber > 5);
return ImmutableQualityInfo.of(scanNumber, isGoodEnough, false);
}
};
ImagePipelineConfig config = ImagePipelineConfig.newBuilder(DetailsActivity.this)
.setProgressiveJpegConfig(pjpegConfig)
.build();
Fresco.initialize(DetailsActivity.this, config);
ImageRequest request = ImageRequestBuilder
.newBuilderWithSource(getUriFromUrl(url))
.setProgressiveRenderingEnabled(true)
.build();
PipelineDraweeController controller = (PipelineDraweeController) Fresco.newDraweeControllerBuilder()
.setImageRequest(request)
.setOldController(i.getController())
.build();
i.setController(controller);
From the looks of all your docs, ‘setController’ is that poiint, but the javadoc has no mention of this and i seem to see no loading occurring?
Issue Analytics
- State:
- Created 8 years ago
- Comments:20 (8 by maintainers)
Top GitHub Comments
I have same issue with image loading. I use
SimpleDraweeView.setImageURI(Uri.parse(uriStr))
with next link: http://az735069.vo.msecnd.net/posts/25_8cb72bffeee54d50bc075be2ad3cf56a_o.jpg and I see only placeholder (picasso loads this image fine) But with this link: https://freeme.blob.core.windows.net/posts/25_2576773736e8485f9698eb126de3960e_o image is loaded fine. I think the issue may be related with “.jpg” ending.Well, i went ahead and added the OKHttp just to see if it made any difference, only to hit another issue:
java.lang.NoSuchMethodError: com.squareup.okhttp.OkHttpClient.open at com.squareup.okhttp.OkUrlFactory.open(OkUrlFactory.java:44)
using: compile ‘com.facebook.fresco:imagepipeline-okhttp:0.1.0+’