Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why the photos taken are stored 2 versions ? #42

Open
phasuksmit opened this issue May 12, 2015 · 13 comments
Open

Why the photos taken are stored 2 versions ? #42

phasuksmit opened this issue May 12, 2015 · 13 comments
Assignees
Labels

Comments

@phasuksmit
Copy link

Why the photos taken are stored 2 versions ?
both in /DCIM/...
and /Pictures/...

uri: /storage/emulated/0/Pictures/1431406896165.jpg
uri: /storage/emulated/0/DCIM/Photo_20150512_120139.jpg

Can anyone tell me how to remove one creation process ?

@jaydeepw
Copy link
Owner

This is a known issues. I will soon look into it and get back to you.

@phasuksmit
Copy link
Author

Is one of them created by camera3 and another one created by pp3 ?

I guess that the one from camera3 is used to process in pp3, and you forgot to delete the first one

can u tell me any clue ?

EDIT * I see SimpleCameraHost.getPhotoFilename() include Photo_+ts+.jpg

so the one in DCIM is from cwac camera

@jaydeepw
Copy link
Owner

No camera3 and pp3 are just proxy test modules that are removed in production. They are not even being called when you have enabled the gradle dependency from maven.

@jaydeepw
Copy link
Owner

anyway, you can try playing with it and notifiy me of what exactly is causing this. At the moment, I am clueless and need diving in in order to figure the problem culprit out. You help will greatly be appreciated and if possibly, I will release with the fix in 1.0.14

@jaydeepw jaydeepw added the bug label May 12, 2015
@jaydeepw jaydeepw self-assigned this May 12, 2015
@phasuksmit
Copy link
Author

Ok I will tell you then

I'm just novice in github , I'm sorry for any using-mistake .

@jaydeepw
Copy link
Owner

Its perfectly fine to make mistakes @phasuksmit

@phasuksmit
Copy link
Author

I found it ..
CwacCameraFragment.java

String path = MediaStore.Images.Media.insertImage(getActivity().getContentResolver(), bitmap, getPhotoFilename(), null);

this not only get path from somewhere, but 'insertImage' also creating new thumbnail and another file too

how can I fix this ? Seems like Android not run file.java, it only open from .class file

@jaydeepw
Copy link
Owner

You will have to clone this repository, make the changes and send me the PR. I will merge once I feel everything is fixed correctly. If it is not urgent to you, it will need me a day or 2 to get this fixed and out into test builds.

@phasuksmit
Copy link
Author

In the cloned file, camera is broken (running in Note2, Note1)

I can't do anything right now

screenshot_2015-05-12-15-57-20

@jaydeepw
Copy link
Owner

This is strange. A friend of mine uses PolyPicker and he uses Note2 to test.

@phasuksmit
Copy link
Author

It's happen to me only from the default cloning link

anyway, I suggest you to fix

String path = MediaStore.Images.Media.insertImage(getActivity().getContentResolver(), bitmap, getPhotoFilename(), null);

change path to anything, may be default gallery path, try not to use insertImage as it will create small photo.

@jaydeepw
Copy link
Owner

Ahh. Thanks for the help man... I will keep it in mind and fix ASAP. In the meantime test the snapshot build and report the bugs back here. Checkout my G+ post from last evening https://plus.google.com/+JaydeepWagh/posts/VTkVsDwPmpU

@noomz
Copy link

noomz commented Sep 14, 2016

I found it's a bug in file https://github.com/jaydeepw/poly-picker/blob/master/PolyPickerDemo/pp/src/main/java/nl/changer/polypicker/CwacCameraFragment.java#L139

I can quick fix by adding pictureTransaction.needByteArray(false);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants