Git Product home page Git Product logo

losslessjpgcrop's People

Contributors

comradekingu avatar k3b avatar pipefan413 avatar unbranched avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

losslessjpgcrop's Issues

Question as a user: how you achieved lossless jpeg manipulation

Sorry for using issues for asking questions, but i wanted to ask how you did this? (i don't have android programming experience, so i can't look at the code for finding out)

the actual question of me is this:

I use another app for photo editing and it has an option to choose output quality of jpeg.

Are cropping an image with setting the jpeg quality of that app to 100 percent is same as cropping it with your app or the procedure is different?

I also suggest putting your answer in readme of this repo because that will be really useful for average user.

Thank you very much.

Cropping result image: exif-thumbnail not updated or deleted

After cropping a jpg the result picture was cropped as expected and source meta data (exif, iptc, xmp) was copied to the cropped destination jpg, including the original jpg-exif-thumbnail

I would either expect that the cropped image has no jpg-exif -thumbnail or an updated thumbnail.

As a result my android filemanger shows a preview of the original image and not of the cropped on.

Waiting for fix in used library facebookincubator/spectrum#41

Addition of Rotation feature to llCrop (Loss Less)

Repository

https://github.com/k3b/LosslessJpgCrop

Introduction

What is llCrop (Loss Less)?

llCrop is an android application that allow user to remove unwanted part in a jpeg photos and ensure there is no loss of quality.

Component

My suggestion is on the

  • Photo editing interface

Proposal

llCrop is an application that is used to edit unwanted part in jpeg photos and still not loose its image quality. Adding the proposed features will improve the application.

  • Rotation

Rotation-

I suggest the addiction of the rotation feature. The llCrop (Loss Less) is an application which is built for editing of image but currently the application lack the enabling of rotating image from side to side positions of choice.
I proposed the addition of the rotation feature that can easily allow users to rotate image from its original position to a preferred position.

MOCKUP EXAMPLE

Rotate

The image above is how the Rotation feature can look like when implemented that will allow users to be able to change the position of the image side by side.

  • Rotation –
    These will be a very important feature that will improve the application. It will allow users to place image into any position of choice.
    For example: A user who edited an image, but not too comfortable with the way the image is positioned, the user can simply click on the rotation feature and change image to preferred position of their choice.

Conclusion

The feature when implemented will really improve the application, it will make the application to be more efficient and useful to users and will increase the users experience and the users-base.

My Github Profile

https://github.com/adewararilwan

[Update 20190527 by k3b] Removed feature request "add text" as this cannot be done lossless

Display crop box coordinates and size

It would be useful to have XY offset of of top left corner of crop box displayed along with it's dimensions. One can get more predictable results by sticking to 8 or 16 multiples for offset and box size allows to target aspect ratio

Please add an option to resize pictures

Hello

This app is great.

May you please add an option to resize the whole picture instead of cropping it?

I think the simple approach to implementing it is let user only set wide or height, not both and so the app can keep the aspect ratio and change the size of the picture losslessly.

This option will be really great.

Thank you very much.

App malfunctions when it's being rotated to landscape

DESCRIPTION
After cropping an image on the app and then I rotate the phone to land scape mode then click on save the photo doesn't get saved

STEPS
Open the app
Select And crop a picture
Click on the save button by the top right corner on the app
Then rotate the app to landscape, then rename the photo and click on save

EXPECTED
After cropping an image on the app and then I rotate the phone to landscape mode then save the photo, I expect the photo to get saved on my phone and I should be able to view the photo

OBSERVATIONS
After cropping an image on the app and then I rotate the phone to landscape mode then save the photo on my phone, the photo doesn't get saved instead I get a broken photo which is not viewable

Addition of fixed dimension, modifyable dimensions to IICrop

Introduction

IICrop (Loss Less) is an android application that helps to remove unwanted areas in a photo. It crops the image while ensuring there is no loss of the image quality.

Component

My suggestion is on the

  • Photo edit interface

Proposal

IICrop is a cool application that is used to edit unwanted parts of a photo without losing any of the original image quality. I still believe the application can still be improved.

  • Fixed dimensions – I suggest the addition of fixed dimension when cropping the image. Currently, IICrop only have a free-form cropping. I propose the addition of 3 or more fixed dimensions that can easily be selected without any more alterations.

  • Editable dimensions – The editable dimensions gives users the opportunity to specify the exact specification they want. This is one important feature that will improve the application. Users can enter the figures they want the dimension to be.

  • **Share edited photos ** This is a basic feature yet important one. The edited feature should be able to be shared to other users or other applications right inside IICrop.Implemented in #2.

Mockups/Examples

Comb20052019121915.jpg

This is how I want the fixed dimension to be modified. you can see that the dimensions are already predefined and you just have to choose them.

Comb20052019121945.jpg

The editable dimension should be modified like this. The user can input the figures right in the blue box which will automatically give the shape.

20190520_123134.jpg

This is the Share function that will allow sending of the edited photo right inside the application.

Benefits

Fixed dimensions – This is a very important feature that will improve the application. It will allow users to select from a predefined dimension. This will save time and stress spent in adjusting the free-form to crop an image. For example, a user who want to get a perfect square or an inverted rectangle crop will spent minutes adjusting. Instead of wasting time to adjust, the user can simply select from the predefined dimensions and apply to the photograph. It is simple when trying to get a kind of passport photograph dimension and so on.

Editable dimensions- This is different from the free-form crop because users can input whatever size they want. This will help when trying to get an actual specification. Instead of adjusting and trying to guess if you got the specifications right, you can just input the figures and the crop shape pops up. This is particularly useful for users who need certain dimensions for an online registration.

Share edited photos - The most common reason we crop unwanted parts out of a photo is to share them with who needs it. The ability to share the edited photos right inside the application will save time and stress. You are cropping a photo so you can send to a friend on WhatsApp or Facebook. It is really stressful when you have to navigate to your phone gallery just to send when you could have done that right inside the application. It saves time and eliminates stress.

Conclusion

This features when implemented will greatly improve the application. It will let the application to be a more complete one as users can perform all the functions in it without looking elsewhere. This will increase the userbase and also change the way it is utilized.

llCrop crashes in "save crop picture as" when filename contains illegal character

Project Information

Expected behavior

When I try to save the picture after crop, the picture should be saved and the saved picture should appear in the mobile phone gallery.

Actual behavior

The application crashes when I try to save the picture to the cell phone storage

How to reproduce

1-Download the app and open it
2-Select any picture from mobile storage
3-Crop the image
4- Try saving the image in the phone by clicking Save button
5- see the bug

  • Browser/App version: Version 1.0.1.190507
  • Operating system: 6.0.1
  • Smartphone: Galaxy j7

Recording Of The Bug

20190512_144440

My Github Account

https://github.com/facebook-786

Logcat

D/AndroidRuntime( 4900): Shutting down VM

E/AndroidRuntime( 4900): FATAL EXCEPTION: main

E/AndroidRuntime( 4900): Process: de.k3b.android.lossless_jpg_crop, PID: 4900

E/AndroidRuntime( 4900): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=2, result=-1, data=Intent { dat=content://com.android.externalstorage.documents/document/primary:image_1609_llcrop (1).jpg flg=0x43 }} to activity {de.k3b.android.lossless_jpg_crop/de.k3b.android.lossless_jpg_crop.CropAreasChooseActivity}: java.nio.charset.IllegalCharsetNameException: java.nio.charset.CharsetICU[UTF-8]

E/AndroidRuntime( 4900): 	at android.app.ActivityThread.deliverResults(ActivityThread.java:4005)

E/AndroidRuntime( 4900): 	at android.app.ActivityThread.handleSendResult(ActivityThread.java:4048)

E/AndroidRuntime( 4900): 	at android.app.ActivityThread.access$1400(ActivityThread.java:177)

E/AndroidRuntime( 4900): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1479)

E/AndroidRuntime( 4900): 	at android.os.Handler.dispatchMessage(Handler.java:102)

E/AndroidRuntime( 4900): 	at android.os.Looper.loop(Looper.java:135)

E/AndroidRuntime( 4900): 	at android.app.ActivityThread.main(ActivityThread.java:5910)

E/AndroidRuntime( 4900): 	at java.lang.reflect.Method.invoke(Native Method)

E/AndroidRuntime( 4900): 	at java.lang.reflect.Method.invoke(Method.java:372)

E/AndroidRuntime( 4900): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)

E/AndroidRuntime( 4900): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)

E/AndroidRuntime( 4900): Caused by: java.nio.charset.IllegalCharsetNameException: java.nio.charset.CharsetICU[UTF-8]

E/AndroidRuntime( 4900): 	at java.nio.charset.Charset.checkCharsetName(Charset.java:201)

E/AndroidRuntime( 4900): 	at java.nio.charset.Charset.forName(Charset.java:295)

E/AndroidRuntime( 4900): 	at java.net.URLDecoder.decode(URLDecoder.java:60)

E/AndroidRuntime( 4900): 	at de.k3b.android.lossless_jpg_crop.CropAreasChooseActivity.toString(CropAreasChooseActivity.java:263)

E/AndroidRuntime( 4900): 	at de.k3b.android.lossless_jpg_crop.CropAreasChooseActivity.onOpenPublicOutputUriPickerResult(CropAreasChooseActivity.java:234)

E/AndroidRuntime( 4900): 	at de.k3b.android.lossless_jpg_crop.CropAreasChooseActivity.onActivityResult(CropAreasChooseActivity.java:321)

E/AndroidRuntime( 4900): 	at android.app.Activity.dispatchActivityResult(Activity.java:6441)

E/AndroidRuntime( 4900): 	at android.app.ActivityThread.deliverResults(ActivityThread.java:4001)

E/AndroidRuntime( 4900): 	... 10 more

File name displayed for rename, but cropped image wasn't displayed

Description

I selected a picture and cropped it after which I click the save icon to save it. Only the file name was shown and highlighted for me to rename in an empty folder. There was no traces of the image I cropped.

Expected behaviour

My expectations was to see the cropped picture in the folder after saving it.

Reproducing the behavior

After launching the app

  • Select a picture in the file manager
  • Crop the picture and click on the save icon at the top right side
  • You will notice an empty folder with the file name highlighted for rename.

Device used

  • Techno spark k7
  • O S: Android 7.0

Reproducing the behavior

https://youtu.be/RxjMV0HVIKs

App unable to select screen shot images for cropping.

Description

I wanted to crop a screen shot image, so I launched the app and opted to select the image I wanted to crop, but all the images in the screen shot folder were faded. I tried clicking on the screen shot images to select one for cropping, but all to no avail.

Expected behaviour

My expectations was to be able to select any screen shot images for cropping.

Steps to reproduce

After launching the app

  • click on screen shot in the android file manager and try to select any image. You wouldn't be able to. You will notice that all the screen shot images are faded,thereby making them unclickable.

  • Device used: Techno spark k7
    O.S: Android 7.0

Reproducing the behavior

https://youtu.be/Sj7Z_Pwkawo

Lossless partial blur (blur only a face but leave all other JPEG blocks untouched)

With privacy expectations increasing, I often have to blur people's faces on pictures (when uploading to Wikimedia or sending emails for instance).
While there are many blurring apps, all apps I have tried introduce loss in all parts of the picture, instead of only the blurred area and surrounding JPEG blocks (example).

It would be great if LLCrop (which is already great for lossless rotation and cropping) could support lossless blurring.
Of course the blurred part and surrounding JPEG blocks will have loss, but the rest of the picture should be left intact.

Suggested algorithm:

  1. Use lossless crop to split the picture into elementary JPEG blocks.
  2. Overwrite the JPEG blocks where blurring was applied (these blocks will obviously not be lossless).
  3. Join the JPEG blocks together into a full picture and save it.

jpegtran implements the lossless join operation (calling it -drop), so it could be used as a reference.

For the UI, anything is fine but here is my suggestion: A round tool of configurable diameter makes the touched area turn red until the finger is lifted. After the finger is lifted, the whole area is repainted using the average color of that area. This kind of blurring is more reverse-proof than pixelization or Gaussian blur, yet less visually distracting than a black rectangle.

Thanks a lot for your great apps!

Dual-license to Apache license?

Happy New Year k3b!

I want to integrate a crop feature into our open source app (Wikimedia upload app), and re-using your smooth UI work would be ideal.

However, our app is Apache-license, so we can not include GNU-GPL code.

While I always license my desktop tools as GNU-GPL, most open source Android apps are Apache-license, so having this license would allow your code to be useful to more apps.

If you agree, it would be as simple as adding this text file to the root of the repository: https://www.apache.org/licenses/LICENSE-2.0.txt

Thank you for your consideration! :-)

Wipe exif button

Could you please add a wipe exif button.
Your app is very useful for focusing on the important part of a picture before posting it online. But wiping exif is a must before posting, so I always need a second app.

JPEG Block Grid

In the cropping UI, it might be useful to show a grid to visualize the edges of blocks. Perhaps the crop box could even snap to the edges, so what the user sees in the UI is exactly what will show up in the resulting image.

Better control of cropped image size

Please add a dialogue box to crop to common image aspect ratios (16:9, 1:1, etc.), preferably accompanied by two input boxes that show and allow adjustment of the output width and height. At the moment it's virtually impossible to get a precise size.

Save button not working, is gray

Hello developer,

Please forgive me. Your app is not seeming to function. After I crop the image the way I like I press the button in the top right. A filename screen shows with a filing cabinet in the middle, I try to type the file name but the save button is grey and not able to be pressed.

I also try to remove the ':' character from the suggest filename but is not functioning for me still.

Why is not saving? Maybe is a bug? I am on the Nougat android. If you can help I would be very thankful. Having lossless crop is a clever idea, you must be clever to make this.

Thankyou for reading.

Doesn't work with big images

Hi, my camera can save jpeg pictures as 9248x6944. when trying to crop such images the app displays only a white canvas with the grid and movable corners but not the image.

The canvas can be (blindly) cropped and everything behaves like normal but the resulting picture is just the canvas.

Looked at logs but cant see anything obvious.

It works very nicely fro smaller pictures.

Github doesn't even allow me to attach an example file saying it is too big...

Create gui to load , select cropping area and save image

This initial feature-set is completely based on Androids-Storage-Access-Framework (SAF)

Is jpg rotation lossless? changes jpg-file-size

I have observed that rotating a jpg image without cropping the file size changes it-s file size and rotation is done throuh image manipulation.

I would have expected that only the exif-orientation flag is updated.

If i rotate an image with exif-orientation=90 degrees by 180 degrees i expect the same image but with orientation 270 degrees.

The current code does an image-rotation transformation and result exif-orientation is always 0

Although rotating changes image-file size, is it still loss-less?

For details see
facebookincubator/spectrum#193

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.