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

Enhancement: enhance image filter implementation #96

Open
sualko opened this issue Oct 1, 2019 · 10 comments
Open

Enhancement: enhance image filter implementation #96

sualko opened this issue Oct 1, 2019 · 10 comments

Comments

@sualko
Copy link
Collaborator

sualko commented Oct 1, 2019

For me there are currently two issues regarding image filters:

  1. Personally I like consistency across images, so an option would be nice to specify a filter for all images.
    [X] done and merged Add option to choose a default image filter #149

  2. Filters are very basic and doesn't look that good.

  3. If you have a selection dialog for users, there should be a preview.

I think the first point is easy to implement, but for the second we should probably switch from GD to ImageMagick. Would love to have a easy way to specify own filters in the config, but I'm not sure how easy this is. There is also a nice starting point: https://code.tutsplus.com/tutorials/create-instagram-filters-with-php--net-24504

@andi34 @obkram what do you think?

This would go on top of the current refactoring branch. @andi34 therefore please don't rebase this branch 😉.

2019-10-01 13 02 25 localhost d1617895ab75

@andi34
Copy link
Collaborator

andi34 commented Oct 1, 2019

I've played around with simple imagemagick filter too (on Pi3 and Pi4) but noticed the performance wasn't good, that's why I used the GD way.
But I haven't tried PHP ImageMagick Extension (IMagick)

@andi34 andi34 changed the title enhance image filters Enhancement: enhance image filter implementation Oct 2, 2019
@sualko sualko added this to the v2.1.0 milestone Oct 11, 2019
@andi34
Copy link
Collaborator

andi34 commented Oct 11, 2019

Guess we can close #111 and keep this here depending on how the rework looks like later?

@sualko
Copy link
Collaborator Author

sualko commented Oct 13, 2019

Guess we can close #111 and keep this here depending on how the rework looks like later?

I think it's a good idea to close that issue and include it in 2.1. I think it make sense to release the 2.0 as soon as possible.

@andi34
Copy link
Collaborator

andi34 commented Oct 19, 2019

#149 related to 1.

sualko pushed a commit that referenced this issue Oct 22, 2019
- Allow to use a filter for all photos by default.

related to #96
andi34 added a commit that referenced this issue Oct 22, 2019
- Allow to use a filter for all photos by default.

related to #96

Change-Id: I5673e646114e31106c23324871980016c096a030
@andi34
Copy link
Collaborator

andi34 commented Nov 9, 2019

https://phpimagick.com/Imagick

Leaving this here in case imagick gets interesting in future. The webpage is available on GitHub too, effect examples can be seen there.

@rawbertp
Copy link
Contributor

rawbertp commented Nov 10, 2019

How much effort would it be to change the UI-flow as follows:

  1. Take picture
  2. Display the picture (file saved automatically)
  3. Allow users to apply a filter
  4. The pic changes according to filter selected
    • For performance reasons it might be necessary to scale the image down for the filter preview and first apply it to the actual full-size image upon save was clicked
  5. If the users want to save the image with the applied filter they would have to click a "Save" button (TBD: would this overwrite the original picture or will both be saved?)

@andi34
Copy link
Collaborator

andi34 commented Nov 10, 2019

@rawbertp depending on coding skills and time you can spend. For me this would be a big project without a known end result. Someone with advanced coding skills and knowledge might have it easier.

@rawbertp
Copy link
Contributor

rawbertp commented Nov 10, 2019

@andi34 Appears to be much easier than expected... This is the result with only a few lines of code changed. The missing 20% might be the hardest part, though...

ezgif-6-40c5a04dc130

Changes (so far): rawbertp@4b2b23d

@andi34
Copy link
Collaborator

andi34 commented Nov 10, 2019

Wow, Looks great :)

@andi34
Copy link
Collaborator

andi34 commented Nov 11, 2019

https://github.com/zaachi/PHP-Instagram-effects/blob/master/src/Image/Filter.php

In case there's anyone liking to take a look at

@andi34 andi34 removed this from the v2.1.0 milestone Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants