Code Monkey home page Code Monkey logo

Comments (14)

hosaipang avatar hosaipang commented on July 21, 2024 2

Hi, @MehdiBrandoMahdloo. The solution had been found.

For this line of code:
canvasImageView.image?.draw(in: CGRect(x: 0, y: 0, width: canvasImageView.frame.size.width, height: canvasImageView.frame.size.height))

It directly uses the image's width and height as the parameters.
However, they may have decimal point.

I guess iOS automatically round down your value, and then the image is resized by 1 pixel per drawing action.

So, just adding ceiling function before using the size, the issue will be solved.

Good luck, and have a nice day! ^.^

from photo-editor.

NatanijelVasic avatar NatanijelVasic commented on July 21, 2024 1

I have the same issue on my phone. This effect appear under two conditions:

  • If i'm using the FRONT facing camera (selfie camera).
  • If I have NOT cropped the photo beforehand.

If I crop the photo first, and then draw over the photo, it is all OK. I have also noticed that if I apply different pressures to the screen, the washing effect changes i.e. if my finger is in the same position, but I vary the pressure, the ink on the photo moves.

from photo-editor.

NatanijelVasic avatar NatanijelVasic commented on July 21, 2024 1

Actually, after further investigation, it seems like this issue is only related to the aspect ratio of the image. It seems that very long images are ok with the ink, but very tall tall images make the ink wash away.

from photo-editor.

NatanijelVasic avatar NatanijelVasic commented on July 21, 2024 1

I have not yet found a solution, but I will continue to investigate. I also noticed that there is sometimes a horizontal cutoff in the image: above it, the ink behaves well, but below it, it gets washed away. Very strange!

Since the touch pressure affects the washing effect, I am starting to think that maybe this plugin uses some sort of iOS "brush" that intentionally washes away, instead of a normal "pencil".

from photo-editor.

MehdiBrandoMahdloo avatar MehdiBrandoMahdloo commented on July 21, 2024

Thank you for the tips @NatanijelVasic ! I guess there's still no solution to this problem, right?

from photo-editor.

MehdiBrandoMahdloo avatar MehdiBrandoMahdloo commented on July 21, 2024

Good point! I've tried several images with different aspect ratio. It keeps behave very randomly to me. The washing effect appears on square pics as well as on rectangular ones...

from photo-editor.

MehdiBrandoMahdloo avatar MehdiBrandoMahdloo commented on July 21, 2024

Can it be just a problem based on the pic resolution? After several tests, it seems to me that only pics with "lower" resolution are washed away (this is why pics took with the front camera have this issue).

from photo-editor.

NatanijelVasic avatar NatanijelVasic commented on July 21, 2024

I just tried loading the same image multiple times. Sometimes I get the bug, sometimes not.

from photo-editor.

MehdiBrandoMahdloo avatar MehdiBrandoMahdloo commented on July 21, 2024

It's just a shame this problem was never fixed after all these complains. And we're all going mad figuring out why...it just don't seem to have a logic.

from photo-editor.

MehdiBrandoMahdloo avatar MehdiBrandoMahdloo commented on July 21, 2024

Thank you so much HosaiPang! @NatanijelVasic did you try the solution suggested by @hosaipang ? Does it work?

from photo-editor.

NatanijelVasic avatar NatanijelVasic commented on July 21, 2024

@MehdiBrandoMahdloo Are you using the NativeScript plugin for this? Because the nativescript version does not download from this updated repository.

from photo-editor.

NatanijelVasic avatar NatanijelVasic commented on July 21, 2024

@hosaipang @MehdiBrandoMahdloo As far as I can see, someone fixed this bug 25 days ago in this repo, but in the Examples demo folder instead of the main source code folder. Was this a mistake?

from photo-editor.

mhm-ibrahim avatar mhm-ibrahim commented on July 21, 2024

@MehdiBrandoMahdloo Can you check the latest release 0.6 and update me please ?

from photo-editor.

jnes92 avatar jnes92 commented on July 21, 2024

@M-Hamed
I also noticed the washing effect inside version 0.5
After updating to v0.6 I could not reproduce the issue again ;-)

from photo-editor.

Related Issues (20)

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.