08-06-2016, 11:24 AM | #1 |
Evangelist
Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
|
Using built-in imagemagick to crop an image
How do I use the built-in imagemagick application to crop an existing image in .png format?
- the image is generated by the "press opposite corners" screenshot trick. - I use pw1 and pw3. So the images would be 758x1024 and 1072x1440. - I assume the IM command can be entered from kterm and could be converted into a KUAL extension.. since the crop size and location I want is fixed - I want to generate a screenshot from the Eboard Chess application and do a crop so that I get an image of the board only. |
08-06-2016, 11:37 AM | #2 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Code:
man imagemagick |
Advert | |
|
08-06-2016, 02:45 PM | #3 |
Evangelist
Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
|
Hmm... I was asking about using imagemagick ON the Kindles..
I read here somewhere that the screensavers hack uses it. |
08-06-2016, 03:08 PM | #4 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
I.E: The Linux (a *nix system type) is not a full installation, it is only a partial, embedded system. So you need to have access to either a complete install of a *nix based system or access to a web search engine (both will recognize the manual command I listed for you). IM is not pre-installed that I know of, it is part of the ss package. |
|
08-06-2016, 04:13 PM | #5 |
Groupie
Posts: 175
Karma: 54048
Join Date: Mar 2016
Device: PW3 5.6.5-usbnet
|
IM should support the basic features, also on Kindle. Did you try 'convert -crop ...' already?
|
Advert | |
|
08-06-2016, 11:00 PM | #6 |
Evangelist
Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
|
I tried convert command without any arguments on my pw3 and I got a help list. But on my pw1 I got a 'command not found' message. How come? I have installed the screensaver hack on my pw1. Isn't it supposed to be using IM?
|
08-06-2016, 11:03 PM | #7 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Start checking with the most basic possiblities -
Is the PATH variable the same on both devices? On the one that is found, where is it? Check the same path on the one that is not found, is it really not there? |
08-07-2016, 01:24 AM | #8 |
Evangelist
Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
|
Thanks, knc1!
I already checked. On both the pw1 and pw3, there is a "convert" executable in the '/mnt/us/linkss/bin' folder. However this executable is not in the PATH variable. On the pw3, there is an additional "convert" executable in the '/usr/local/bin' folder - which is in the path variable. So, that clears up the mystery! Also, '/usr/local/bin' of the pw3 contains lots of other stuff. These are the goodies you mentioned would be available in the "factory" image, which gets stripped out in the "customer" image, like in my pw1 - which only contains "usbnetwork.sh". You had also mentioned the possibility of transferring these goodies over to a "customer" image kindle. Would a plain copy work? Ok. Let me play with 'convert' now.. |
08-07-2016, 03:36 AM | #9 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Better to make an archive of it and copy the archive:
Code:
cd /usr tar -czf /mnt/us/factutil.tgz local Code:
cd /usr tar -xzf /mnt/us/factutil.tgz |
08-07-2016, 07:59 AM | #10 |
Evangelist
Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
|
Success!
Got what I wanted.. Steps:
Thanks to all for help! Last edited by nasser; 08-07-2016 at 10:12 AM. |
08-07-2016, 08:23 AM | #11 |
Groupie
Posts: 175
Karma: 54048
Join Date: Mar 2016
Device: PW3 5.6.5-usbnet
|
Typo in 6 & 9: '/mnt/images folder' instead of '/mnt/us/images folder'.
Last edited by Yourcat; 08-07-2016 at 12:20 PM. |
08-07-2016, 09:36 AM | #12 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Ah, so.
Now you are ready to write a chess, e-book with illustrations your certain will display on a Kindle, since they came from a Kindle. Shown: Common Openings: Ruy Lopez, a.k.a: Spanish Opening. Last edited by knc1; 08-07-2016 at 09:46 AM. |
08-07-2016, 10:18 AM | #13 |
Evangelist
Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
|
Thanks, Yourcat!
/mnt/us/images it is. Corrected. Yes, knc1! That's one of my future projects. For now, light duty kindle hacking is enough fun... |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
WebReaderViewer - built in image/frame/string/html viewer for kindle | Aeris | Kindle Developer's Corner | 13 | 11-05-2013 03:11 AM |
Kindle paperwhite crop background-image on top/bottom | j.puff@ppp.eu | Kindle Formats | 2 | 08-28-2013 12:58 PM |
Kindle paperwhite crop background-image on top/bottom | j.puff@ppp.eu | Kindle Developer's Corner | 1 | 08-26-2013 07:02 PM |
Auto crop raster image PDF - any software? | bthoven | 16 | 09-07-2010 03:55 PM | |
Failed to load ImageMagick | trustno12003 | Calibre | 2 | 06-17-2009 01:25 AM |