Skip to content

Apply affect for 2 images in transition #3

Open

Description

@dumihi313

I succeeded in setting transition for 2 image. Now i want to apply effect for each image.
How can i do it? please help me. Thank you

Activity

  1. CreateChance commented on Dec 23, 2019

    @CreateChance
    Owner

    Apply effect for each image? Maybe you want a filter?Transition means effect between two images,so I don't really understand what you mean😳

  2. dumihi313 commented on Dec 23, 2019

    @dumihi313
    Author

    @CreateChance
    Yes i want to apply filter for 2 image during their transition
    I succeeded in set filter for GPUImage for my view. And now I want to apply for transition
    You can see this video to understand clearly:
    https://drive.google.com/file/d/1lReuKUhNJHm5-flzTripPoi0f2k8wqWw/view?usp=sharing

    I want the transition has first image filter looks like image (GPUImage ) before transition follow timeline

  3. dumihi313 commented on Dec 23, 2019

    @dumihi313
    Author

    Based on addOperator to set filter and my ediction in method render at IEClip.java
    ``
    if (mTransition != null && mDuration - localTime <= mTransitionDuration) {

            mTransition.setProgress(1.0f - (mDuration - localTime) * 1.0f / mTransitionDuration);
            mTransition.exec();
            if (mDuration - localTime <= mTransitionDuration/2) {
                mOpList.get(0).exec();
            }
            else {
                mOpList.get(1).exec();
            }
    
        }
    

    ``
    The results

    https://drive.google.com/file/d/1cji_4VVXpTuPmxqDlZ7i-2JOkgJvyaYv/view?usp=sharing

    I try this and it show result like above.
    In conclusion, I think that the best solution is applying filter property for 2 bitmaps in Clips

  4. CreateChance commented on Dec 23, 2019

    @CreateChance
    Owner

    Yeah, this works! There's another way to do this, you can get transition's gl texture, and render it with filter, this could works too! It works like a pipeline, transition's texture is output, and filter's input is transition's output~ Let's call this filter: TransitionFilter :)

  5. dumihi313 commented on Dec 23, 2019

    @dumihi313
    Author

    For implement, the TransitionFilter I showed you afternoon can not display 2 filter in the same time.
    I am developing app look like kinemaster, what I want likes this link.

    https://drive.google.com/file/d/109Cv4iwY6kRCLqhc_6Rq9o_a6FymxgVt/view?usp=sharing

    To do like this video, I think we have to set the new bitmap before addClip, this bitmap is the result of original bitmap and filter ( i am researching the way to do that). Is my ideal Feasible?
    Do you have any ideal ?
    Thank you so much @CreateChance

  6. dumihi313 commented on Dec 31, 2019

    @dumihi313
    Author

    Hello, I nearly done with your Transition filter.
    Now, I am facing with text animation like this link below. Before I found your Transition filter, I using textview and animation view for handling it. But it not support for like renderAtPosition like Transition filter. I think we can have another way to hanle this animation for text is similar your Transition filter by using shader openGl. But your Transition filter should work for 2 bitmap and my text is only has 1. Would you mind giving me some solution to do that.
    https://drive.google.com/file/d/1_k1z7JC1JfMFi3poWKDgQIr1MoJG9C43/view?usp=sharing
    @CreateChance

  7. CreateChance commented on Jan 3, 2020

    @CreateChance
    Owner

    Hi, @dumihi maybe this could help: https://github.com/CreateChance/ImageEditor/blob/master/imageeditor/src/main/java/com/createchance/imageeditor/ops/TextOperator.java, it support text render real time, just change params to make magic~

  8. dumihi313 commented on Jan 3, 2020

    @dumihi313
    Author

    Thank I ensure that I am going to try it <3
    I managed with that a lot. At the movement, I just handle it like this. It animation for all view not only text :). It is so bad
    0~36s
    https://drive.google.com/file/d/1lTZjJhHqEcGbh-pB5VT-fB7PoC7jyVpo/view?usp=sharing

    Hope you can keep updating with this post, because i will have some question during using your help. Thank you @CreateChance

  9. CreateChance commented on Jan 3, 2020

    @CreateChance
    Owner

    It's native crash, do you build the freetype in jni folder? Try unzip apk to check if so lib exists please.

  10. dumihi313 commented on Jan 3, 2020

    @dumihi313
    Author

    Yeah I just fixed it successful.
    Just increase to classpath 'com.android.tools.build:gradle:3.4.2'
    Now I try to do transition with this text

  11. dumihi313 commented on Jan 3, 2020

    @dumihi313
    Author

    Hi @CreateChance
    With transition for text, we need to convert the text to bitmap ???

  12. CreateChance commented on Jan 3, 2020

    @CreateChance
    Owner

    Yes, you need to render text string to bitmap by freetype or other render engine, opengl texture need this.

  13. dumihi313 commented on Jan 3, 2020

    @dumihi313
    Author

    Please watch 39 second to end of video
    https://drive.google.com/file/d/1lTZjJhHqEcGbh-pB5VT-fB7PoC7jyVpo/view
    The transition will do transition filter for all pixel around the text. Do you think after applying freetype bitmap, can it resolve it .

  14. dumihi313 commented on Jan 3, 2020

    @dumihi313
    Author

    As I see to add text, IEManager require has at lease one clip ( image(bitmap)). But i want to add text as a
    independence clip no image background behind. It is hard to adjust :(

  15. dumihi313 commented on Feb 19, 2020

    @dumihi313
    Author

    Hello @CreateChance,
    Thank you for your support. Today, I need a support from you. How can I do gl transtion keeping root width/height of second image.
    As you can see in video link. When transition, the scale of picture 2 is same picture 1, i want this transition keep root width/height picture 2.
    Actual: https://drive.google.com/file/d/1ztxlalAkNSemRjUuUuLoyCNVFCUzH-rq/view?usp=sharing
    Expect like kinesmater app: https://drive.google.com/file/d/1b8b9WVgqaZQHJgzuk0rarJ3XWKkNRWbI/view?usp=sharing

  16. hashmih commented on Jul 27, 2020

    @hashmih

    i'm also facing the same issue @dumihi you got any solution?

  17. hashmih commented on Aug 19, 2020

    @hashmih

    Yeah, this works! There's another way to do this, you can get transition's gl texture, and render it with filter, this could works too! It works like a pipeline, transition's texture is output, and filter's input is transition's output~ Let's call this filter: TransitionFilter :)

    @CreateChance would u like to explain that " how to get transition's gl texture and render it with filter" . it would be great help for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址