Resize images in fototoon
Fix : #1551
Earlier the images were set as background image to the whole canvas as a result they were not resizable. In this fix i have made the images as a sperate globe which is resizable.
After fix:
https://github.com/user-attachments/assets/bbcf333e-e03a-4a1a-a26f-6ab30d66ad58
Hey @llaske please have a look at this
It's nice but it broke the way of using the activity. When the image icon is clicked it suppose to add a new page in the comic. Now it's no longer possible to add page.
It's nice but it broke the way of using the activity. When the image icon is clicked it suppose to add a new page in the comic. Now it's no longer possible to add page.
okay ..... i was not aware of that feature. We can do 3 things:
- either add a button to add new page
- or add a new page when next page button is clicked if the current page is the last page.
- or we can also do one thing that on one page we can add only one image and when new image a new page is created.
The better option is the third.
The better option is the third.
Okay i will work on this Just one thing i would like to make sure is that going with option 3 we will have only one image per page.
with option 3 we will have only one image per page.
yes, that's right
hey @llaske please have a look at my latest commit, made the changes you mentioned. I have added the code for resizing the image and when new image is added a new page is created
Preview:
https://github.com/user-attachments/assets/3c3f16a5-16e1-41e7-9ff5-5cce8e62e11a
Good job. But when opening an existing Fototoon activity with the new version, it shrink images inside.
become:
My older commit was not keeping the aspect ratio of image when it was first loaded. I have updated it so that the original aspect ratio of image is respected.
@llaske please have a look at my latest commit.
I've tested your latest PR, there is a memory leak issue. I've created a three redimensioned images project with some globes. After navigating several times from a page to another, images are not displayed or displayed at the wrong place. It's not happens on the original activity.
Got it ..... I'll try to fix this and update the pr
Hey @llaske please have a look at my latest commit. I have added :
- A cleanup method to Clean up previous resources first and ensure when new comic box is loaded previous one is cleaned.
- Created a completion handler to process any pending changes.
https://github.com/user-attachments/assets/7d96fc7d-d97c-47dd-9512-4b15a2d5f8b3
Hmmm it fix the issue but it's much less fluid, the user has to wait 1 second to switch between pages :disappointed:
Hmmm it fix the issue but it's much less fluid, the user has to wait 1 second to switch between pages 😞
I am having difficulty understanding why this is happening ........... but I'll give it a try