Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 08:47 AM   #1
byword
Enthusiast
byword began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Apr 2022
Device: Onyx Leaf 3
AdjustImage Feature Improvements

I have made modifications to the AdjustImage(image editor).
Because I downloaded version 2.8.1 and modified the files locally, I was unable to distribute the changes via Git.
I modified only three files: AdjustImage.cpp, AdjustImage.h, and AdjustImage.ui. You can download the attached file.
You can test the image editor by replacing the sigil.exe file in your version 2.8.1 installation folder.

The image editing feature is very useful, but I noticed a few inconveniences while using it and made several improvements.
I improved the image placement and crop features, and added eraser and refresh functions.

Crop
  1. Hold Ctrl and left-click to select crop coordinates.
  2. Click and drag any of the 4 corners to adjust coordinates.
  3. Once coordinates are set, click the Crop button to crop the image.

Eraser
  1. Click the Eraser button.
  2. Configure the eraser size, shape (circle/square), and color.
  3. Left-click and drag across the area you want to erase to cover it with the selected color.

For more complex edits, using an external editor would be more practical.

Please review whether this code can be incorporated into the source.
Let me know if you run into any issues during testing. If there are areas that need improvement, I will be happy to update them.
Attached Files
File Type: zip AdjustImage_sigil_2.8.1.zip (2.80 MB, 4 views)
byword is online now   Reply With Quote
Old Yesterday, 09:12 AM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,724
Karma: 212474403
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
It would seem to me that an eraser tool would already cross that "For more complex edits" threshold for using an external editor. But we'll certainly let others give their opinions on it.
DiapDealer is online now   Reply With Quote
Old Yesterday, 09:21 AM   #3
BeckyEbook
Wizard
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 1,024
Karma: 3761621
Join Date: Jan 2017
Location: Poland
Device: Various
I’ll be honest – I practically never use AdjustImage, but of course I couldn’t resist and decided to test this feature.

Crop – it really does work better; I feel like I have more control over the cropped area.

Eraser – hmmm… it works a bit clunkily. I understand it could be used to remove some clutter from a simple image, but I don’t think it’s worth it. Especially if there were more images like that. But – as I mentioned – I’m not the target audience.
BeckyEbook is offline   Reply With Quote
Old Yesterday, 09:26 AM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,994
Karma: 7518950
Join Date: Nov 2009
Device: many
The crop improvements look useful, but we really do not want to get into the recreate a full ImageEditor game and freehand erasure is one of those items. As the name suggests this tool is meant for simple adjustments.

My 2 cents.

Last edited by KevinH; Yesterday at 09:50 AM.
KevinH is online now   Reply With Quote
Old Yesterday, 11:53 AM   #5
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,994
Karma: 7518950
Join Date: Nov 2009
Device: many
Okay, I took a closer look at the code. I am definitely not interested in all the added Erasure bits as it just adds too much code for something most people are just not going to use.

So if you would like to contribute code to Sigil please remove the added erasure code and its ui changes leaving only the improved crop functionality. Then create a github pull request so we can properly review the code changes involved and approve/merge them if they look good.

Please do indicate if these changes are entirely AI based or not so I understand how much testing and review was done and what if any license implications these changes may entail.

Thank you.
KevinH is online now   Reply With Quote
Old Yesterday, 04:01 PM   #6
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 54,335
Karma: 182161621
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
I tried the modifications. I also liked the cropping tool but I didn't find much use for the eraser tool.
DNSB is offline   Reply With Quote
Old Yesterday, 06:22 PM   #7
byword
Enthusiast
byword began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Apr 2022
Device: Onyx Leaf 3
Quote:
Originally Posted by KevinH View Post
Please do indicate if these changes are entirely AI based or not so I understand how much testing and review was done and what if any license implications these changes may entail.

I made this using AI. I've taken the feedback regarding the eraser into account, so I'll remove it and post the updated code.
byword is online now   Reply With Quote
Old Yesterday, 07:46 PM   #8
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,994
Karma: 7518950
Join Date: Nov 2009
Device: many
Do you have a github account and do you know how to make an official Pull Request?

That is the best way for submitting code to Sigil as it automatically checks the proposed changes across all platforms, checks for merge irregularities, allows for easy code reviews, and gives you specific credit for those changes in our commit history and across github.

If you just produce new .ui, .cpp, .h files then I must diff them against our tree and make the changes myself and can only thank you in the commit message but the history of ownership and credit for the contribution is effectively lost.

So please consider using a github Pull Request to make your contribution.

Last edited by KevinH; Yesterday at 08:03 PM.
KevinH is online now   Reply With Quote
Old Yesterday, 09:06 PM   #9
byword
Enthusiast
byword began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Apr 2022
Device: Onyx Leaf 3
Quote:
Originally Posted by KevinH View Post
Do you have a github account and do you know how to make an official Pull Request?

That is the best way for submitting code to Sigil as it automatically checks the proposed changes across all platforms, checks for merge irregularities, allows for easy code reviews, and gives you specific credit for those changes in our commit history and across github.

If you just produce new .ui, .cpp, .h files then I must diff them against our tree and make the changes myself and can only thank you in the commit message but the history of ownership and credit for the contribution is effectively lost.

So please consider using a github Pull Request to make your contribution.
I committed the three modified files via Git. Could you please check if they went through properly? I only use Git for basic needs, so I'm not very familiar with it.

I removed the eraser tool and included a refresh button (next to Redo and Undo) that I didn't mention earlier. I added this feature because it was inconvenient having to close and reopen the image tab to see modifications made with an external editor while the tab is open.

Last edited by byword; Yesterday at 09:08 PM.
byword is online now   Reply With Quote
Old Today, 06:26 AM   #10
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,724
Karma: 212474403
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
You probably just committed to your own fork. You'd need to create a pull request for us to be able to merge your changes.
DiapDealer is online now   Reply With Quote
Old Today, 08:08 AM   #11
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,724
Karma: 212474403
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Looks like the Pull Request came through. Thanks!
DiapDealer is online now   Reply With Quote
Old Today, 08:53 AM   #12
byword
Enthusiast
byword began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Apr 2022
Device: Onyx Leaf 3
Quote:
Originally Posted by DiapDealer View Post
Looks like the Pull Request came through. Thanks!
Please only review these three files: AdjustImage.cpp, AdjustImage.h, and AdjustImage.ui. You can ignore the other changes.
byword is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Improvements on notes danielo515 Onyx Boox 1 09-03-2018 08:35 AM
How many 'improvements' do we really need? Fozzybear General Discussions 61 04-15-2012 12:38 PM
Improvements for PRS900 unknownhero Sony Reader 28 05-06-2010 06:29 PM
Most Important Improvements TedPark Sony Reader Dev Corner 4 06-21-2008 11:04 AM


All times are GMT -4. The time now is 07:56 PM.


MobileRead.com is a privately owned, operated and funded community.