Graphics Requests Thread, Imagemagick gurus? in EduGeek Graphics; (Sorry if this is in the wrong section - hopefully someone can move it if required?)
Hello, all..
We are ...
-
2nd March 2011, 07:57 PM #1
-
-
IDG Tech News
-
2nd March 2011, 09:31 PM #2 I can *use* imagemagick, but i'm also artistically challenged. What's the "crapness" issue? Maybe if we can see the bad we can help better?
-
-
2nd March 2011, 10:19 PM #3
- Rep Power
- 11
Heh.. The crapness was trying to get the 3 things done in a semi-decent way..
I'm at home just now - my WIP files are at work - I'll try to put them up somewhere for you to laugh at - erm - view 
Regards,
Gerard
-
-
4th March 2011, 10:39 AM #4
- Rep Power
- 11
Right - I've been playing some more, and I've got it looking not TOO bad though I'd more than welcome some input..
I'm also looking for some advice (at a tangent here!!)..
One of the schools provided a JPG of their school logo which I've managed reasonably successfully to make to a transparent PNG, but it's still a bit jaggy..
I've followed the guides on YouTube about using Inkscape to convert a JPG to a vector, and that works. However part of the logo is white, and Inkscape's "remove background" in the Trace Bitmap picks that up as being the same white as the background, so it ends up looking weird.
I'm sure there must be some easy way to fix this, but I'm at a loss - any Inkscape folk know?
Anyhoo, back to topic 
My BAT script currently looks like:
Code:
Rem Lifted from http://www.imagemagick.org/Usage/thumbnails/
Rem Generate the PC info (with blank lines for appearance)
convert -pointsize 18 label:" \n\n PC name: %COMPUTERNAME% \n Model: Hewlett-Packard HP Compaq 6910p \n Serial number: 12345678 \n\n" %temp%\pc1.png
convert %temp%\pc1.png -alpha off -fill white -colorize 100% ^
-draw "fill black polygon 0,0 0,15 15,0 fill white circle 15,15 15,0" ^
^( +clone -flip ^) -compose Multiply -composite ^
^( +clone -flop ^) -compose Multiply -composite ^
-background Gray50 -alpha Shape %temp%\thumbnail_mask.png
convert %temp%\thumbnail_mask.png -bordercolor None -border 1x1 ^
-alpha Extract -blur 0x10 -shade 130x30 -alpha On ^
-background gray50 -alpha background -auto-level ^
-function polynomial 3.5,-5.05,2.05,0.3 ^
^( +clone -alpha extract -blur 0x2 ^) ^
-channel RGB -compose multiply -composite ^
+channel +compose -chop 1x1 ^
%temp%\thumbnail_lighting.png
convert %temp%\pc1.png %temp%\thumbnail_lighting.png ^
^( -clone 0,1 -compose Hardlight -composite ^) ^
-delete 0 -compose In -composite ^
%temp%\glass_bubble.png
rem Merge the Corp logo with the crest
composite.exe -gravity SouthWest WWHCrest-Transparent3(PaintDotNet).png -geometry +20+20 CorpStrt.bmp %temp%\outputimage1.bmp
rem merge the Corp/crest with the bubble
composite.exe -gravity SouthEast %temp%\glass_bubble.png -geometry +20+20 %temp%\outputimage1.bmp Backdrop.jpg which gets me:
http://www.ea.e-renfrew.sch.uk/maste...parentLogo.jpg
My issue is now what I do with ones which don't have transparency (EG some schools provided a photo of their building):
which leaves me with:
http://www.ea.e-renfrew.sch.uk/maste...kdropBusby.jpg
I'm not artistic in any way, but I just don't think that's quite as good as the logo. So does anyone have any suggestions? Maybe just have the school name in place of any of the school pics?
-
-
4th March 2011, 11:19 AM #5 Could you do a bit of simple feathering with the school images and save them as png
I've had a little play

edit: Didn't have the individual elements so some of the background is cloned
Last edited by cromertech; 4th March 2011 at 11:21 AM.
-
-
4th March 2011, 11:36 AM #6
-
-
4th March 2011, 11:38 AM #7 Sorry that was done in photoshop but I'm sure it should be possible with imagemagick.
-
-
4th March 2011, 01:32 PM #8
- Rep Power
- 11
Heh - no problem, I'll dabble 
One thing I was hoping to fix was the system information bit.
What I would like to see is it changed from:
PC Name: 123
Model: Hewlett-Packard HP Compaq 6910p
Serial number: 12345678
to something a bit like:
PC Name:123
Model: Hewlett-Packard HP Compaq 6910p
Serial number: 12345678
where the "sections" are bold, while the data is in normal font... However, I've had no luck with that with ImageMagick - anyone??
-
-
4th March 2011, 01:58 PM #9
- Rep Power
- 11
So I don't look like a complete sponger..
This:
Code:
convert ^
-pointsize 18 -font TIMESBD.TTF label:" PC name:" ^
-pointsize 18 -font Times.TTF label:" %COMPUTERNAME% \n" ^
-pointsize 18 -font TIMESBD.TTF label:" Make/Model:" ^
-pointsize 18 -font Times.TTF label:" Hewlett-Packard HP Compaq 6910p \n" ^
-pointsize 18 -font TIMESBD.TTF label:" Serial number:" ^
-pointsize 18 -font Times.TTF label:" 12345678 \n" ^
+append pc2.png
Gets me it all in one line:
PC name: abcde Make/Model: Hewlett-Packard(etc) Serial number: 12345678
If I remove the +append, then I get a png file for each line.
SO close, but not quite.. Can anyone provide the magic syntax??
-
-
4th March 2011, 08:05 PM #10
- Rep Power
- 11
(Answering myself heh)
Code:
convert -pointsize 18 -font TIMESBD.TTF label:"\n PC name: " %temp%\pcname1.png
convert -pointsize 18 -font Times.TTF label:"\n %COMPUTERNAME% " %temp%\pcname2.png
convert -pointsize 18 -font TIMESBD.TTF label:" Manufacturer: " %temp%\Manuf1.png
convert -pointsize 18 -font Times.TTF label:"Hewlett-Packard " %temp%\Manuf2.png
convert -pointsize 18 -font TIMESBD.TTF label:" Model: " %temp%\Model1.png
convert -pointsize 18 -font Times.TTF label:" HP Compaq 6910p " %temp%\Model2.png
convert -pointsize 18 -font TIMESBD.TTF label:" Serial number: " %temp%\serial1.png
convert -pointsize 18 -font Times.TTF label:" 12345678 \n" %temp%\serial2.png
convert %temp%\pcname1.png %temp%\pcname2.png +append %temp%\pcname3.png
convert %temp%\Manuf1.png %temp%\Manuf2.png +append %temp%\Manuf3.png
convert %temp%\model1.png %temp%\model2.png +append %temp%\model3.png
convert %temp%\serial1.png %temp%\serial2.png +append %temp%\serial3.png
convert %temp%\pcname3.png %temp%\Manuf3.png %temp%\model3.png %temp%\serial3.png -append %temp%\pc1.png
produces something pretty darn close to what I was looking for. The spacing is a LITTLE out, but it's looking not too shabby (by my limited abilities, anyway)
I suspect ImageMagick folk out there will be spluttering their coffee over the screen at this shonky code, but heigh-ho..
-
-
5th March 2011, 06:21 PM #11
- Rep Power
- 11
Aha!
Code:
convert ^
-pointsize 18 -font TIMESBD.TTF label:" " ^
-pointsize 18 -font TIMESBD.TTF label:"PC name:" ^
-pointsize 18 -font TIMESBD.TTF label:"Manufacturer:" ^
-pointsize 18 -font TIMESBD.TTF label:"Model:" ^
-pointsize 18 -font TIMESBD.TTF label:"Serial number:" ^
-pointsize 18 -font TIMESBD.TTF label:" " ^
-append %temp%\pcbold.png
convert ^
-pointsize 18 -font TIMESBD.TTF label:" " ^
-pointsize 18 -font TIMESBD.TTF label:" " ^
-pointsize 18 -font TIMESBD.TTF label:" " ^
-pointsize 18 -font TIMESBD.TTF label:" " ^
-pointsize 18 -font TIMESBD.TTF label:" " ^
-pointsize 18 -font TIMESBD.TTF label:" " ^
-append %temp%\pcspace.png
convert ^
-pointsize 18 -font Times.TTF label:" " ^
-pointsize 18 -font Times.TTF label:"%COMPUTERNAME%" ^
-pointsize 18 -font Times.TTF label:"Hewlett-Packard" ^
-pointsize 18 -font Times.TTF label:"HP Compaq 6910p" ^
-pointsize 18 -font Times.TTF label:"12345678" ^
-pointsize 18 -font Times.TTF label:" " ^
-append %temp%\pcnobold.png
convert %temp%\pcspace.png %temp%\pcbold.png %temp%\pcspace.png %temp%\pcnobold.png %temp%\pcspace.png +append %temp%\pcall.png
gets an aligned (as near as I can tell) system info box - yay!
Now back to the feathering... Or, erm, maybe I should get back to fixing these 2 PCs that I'm meant to be doing
-
SHARE: 
Similar Threads
-
By rama1712 in forum Internet Related/Filtering/Firewall
Replies: 0
Last Post: 4th January 2011, 02:54 PM
-
By PiqueABoo in forum General Chat
Replies: 21
Last Post: 23rd February 2010, 11:26 AM
-
By Butuz in forum How do you do....it?
Replies: 4
Last Post: 24th September 2009, 12:49 PM
-
By Ben_Stanton in forum Virtual Learning Platforms
Replies: 11
Last Post: 24th January 2009, 10:51 AM
-
By nickje in forum Web Development
Replies: 2
Last Post: 12th June 2007, 11:42 AM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules