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

IP-56: Compare image by dragging the slider at the bottom (also you can save it) #33

Merged
merged 17 commits into from
Nov 14, 2021

Conversation

mihane-ichinose
Copy link
Contributor

  • Now add a slider at the bottom of the image, it will drag a vertical line to compare between the processed image and the original one.
  • Fixed bug 1: Slider can now update its max value everytime new image is imported so it now works normally on every new image, before the value is locked to the initial image when program loads up.
  • Fixed bug 2: Slider now move back to initial state (rightmost) when new image is imported, filter, colouring applied.
  • Add feature in the top bar menu to allow user save their images in parallel mode. Simply click Export parallel to save in current state.

Some improvements can have in the future:

  • Add a vertical slider so a region can be shown as original image, or user may want to compare vertically.
  • Give a selection whether user want LHS or RHS be original image (and top or bottom, if previous one implemented).
  • Add a spinner just like in filter panel so user can adjust the position of the line by value.

@@ -143,6 +189,10 @@ class EngineModel(
)
Adjustment(adjustmentProperties).process(preview)
previewImage.value = preview
parallelImage.value = previewImage.value
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this line to the end of each function so the imageview updates after every picture process. Now I use update slider sliderInit() and the value of the parallelImage should also change as the slider value binds with it. So I believe this line could be removed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so...?

@JoeyTeng
Copy link
Contributor

Example below:
Screen Shot 2021-11-13 at 19 08 37
Screen Shot 2021-11-13 at 19 07 22

fun loadEncodeImage(path: String) {
val image = Image(path)
encodeImage.value = image
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we remove this spaces...?

@zhao-xuan zhao-xuan merged commit f128857 into develop Nov 14, 2021
@zhao-xuan zhao-xuan deleted the IP56-slider-image-comparison branch November 14, 2021 02:43
mihane-ichinose added a commit that referenced this pull request Nov 14, 2021
fix(slider-with-spinner): NPE: issue introduced in #33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants