Open lillogoal opened 4 years ago
You can fix this issue by saving the captured image in the gallery and use that file path because if you take an image directly from the camera then the size of that image is very small and this is the reason the image is getting destored.
@rohit6027 i'm downloading image with glide with code:
final GlideUrl glideUrl = GenericUtility.getGlideUrlFromData(BackendMethods.URL_IMG_TIMELINE_PATH+ picMatch.get_key(), MyApplication.getUser().getWtkn());
Glide.with(EditImageActivity.this)
.load(glideUrl)
.asBitmap()
.into(new SimpleTarget
so i'm using bitmap. do you think that correct way is going to save in sd and after ?
It doesn't matter how you are loading the image in image view the only thing matter is what file path are you using. how are you getting below path in onActvityResult.
GenericUtility.getGlideUrlFromData(BackendMethods.URL_IMG_TIMELINE_PATH+ picMatch.get_key(),
@rohit6027 mmm path is my server next i download the image and setBitmap I don't understand where the problem is
@rohit6027 any updates ? ty
@lillogoal your case is different but the problem I was facing is the same. I solved my problem after saving the actual image size in gallery when the user clicks an image from the camera.
@lillogoal your case is different but the problem I was facing is the same. I solved my problem after saving the actual image size in gallery when the user clicks an image from the camera.
so you suggest me to save in external directory and after loads in photoeditor view ? can you post an example of saving and loading image ? thanks
@lillogoal no need to save image in an external directory. It will be great if you share a complete image link that you are trying loading in the photo editor view.
@lillogoal no need to save image in an external directory. It will be great if you share a complete image link that you are trying loading in the photo editor view.
sorry but link required auth request with bearer.
i understud image has to save in gallery right ?
I am not sure it will work or not but you can try it.
@rohit6027 yes i can try but you can send me an example of saving in gallery and load from gallery. ty
In the beginning, I said I am taking an image from the camera but you are taking it from the server.
yes yes but after taking from server i convert in bitmap so maybe your implementation is ok. I am desperate I have tried everything
is it happening with every image URL which you getting from the backend ?? if yes then I will create a sample for the same issue else you can share your image URL if possible.
@lillogoal its working file with the URL also I am using this url -> [https://www.webconfs.com/comics/dynamic-vs-static-urls-comic.jpg]
My flow is: user capture image -> upload on server -> other user download image and need to modify it.
If user in the first step decide to load an image from gallery (low resolution maybe) it works. I tested with your url: "https://www.webconfs.com/comics/dynamic-vs-static-urls-comic.jpg" --> it works.
So in my opinion problem is when user capture and upload image with high resolution.
yes you are right. how you are capturing the image ?? are you saving actual image size in local storage ??
PickSetup pickSetup = new PickSetup().setWidth(600).setHeight(400).setGalleryButtonText(getString(R.string.galleria)).setTitle(getString(R.string.choose)).setCancelText(getString(R.string.annulla));
PickImageDialog.build(pickSetup).show(this).setOnPickResult(new IPickResult() {
@Override
public void onPickResult(PickResult pickResult) {
if (pickResult.getError() == null) {
Log.e("PATH",pickResult.getPath());
File file = new File(Environment.getExternalStorageDirectory()+File.separator+"img_"+System.currentTimeMillis()+".jpg");
UCrop.of(pickResult.getUri(), Uri.fromFile(file))
.start(PhotoToBetActivity.this,REQUEST_IMAGE_CROP);
} else {
//Handle possible errors
//TODO: do what you have to do with r.getError();
Toast.makeText(PhotoToBetActivity.this, pickResult.getError().getMessage(), Toast.LENGTH_LONG).show();
}
}
});
I think yes, this is my code, i used a picksetup library, and after selection or capture image user can crop using UCrop library
remove .setWidth(600).setHeight(400) and try again may be this is the problem.
You are right!! I'm testing with more and more cases. After tests i will reply with result.
Hi,
I am also facing a similar issue when apply atleast a filter. The image gets stretched from both X and Y axis and seems to be distorted as well. Has anyone found a solution for this?
I have tried to get the child views to check whether we can change the Scale of Image but unable to achieve this.
Can any one help here please.
Hi,
i have the problem in subject. My Flow is: Download with glide a bitmap and after i will send to PhotoEditor library. When i select at least one filter (gray,rotate, ecc...) the image is distorted.
I checked size of bitmap and it is ok. I checked size of surfaceView and she changes when applying the first filter
@Override public void onSurfaceChanged(GL10 gl, int width, int height) { if (mTexRenderer != null) { Log.e("ONSURFCHANGED",width+"\nHeight:"+height); mTexRenderer.updateViewSize(width, height); } }
Before
After