+ Post New Thread
Results 1 to 11 of 11
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 ...
  1. #1

    Join Date
    Jun 2009
    Location
    East Renfrewshire
    Posts
    149
    Thank Post
    22
    Thanked 23 Times in 17 Posts
    Rep Power
    15

    Imagemagick gurus?

    (Sorry if this is in the wrong section - hopefully someone can move it if required?)


    Hello, all..

    We are getting ready to make the move to Windows 7 sometime, and I'm hoping to customize the 7 logon screen.

    No, I'm not asking how you do that

    Our Council's Corporate division has a standard wallpaper, but I'd quite like to have a slightly modified version of it - one for each school.


    Essentially, what I'm thinking of is something a bit similar to this:

    Windows 7 - Logon Screen

    where I have a picture of the school (perhaps tinted in some fashion) and a text string with the school name underneath.

    There are 32 of 'em, so I don't really want to create one manually as I suspect my Boss would kill me for the time spent on such a frivolity


    I've had a play with ImageMagick, and my results have varied from bad to laughable mostly because my artistic abilities are non-existant.

    Is there anyone out there willing to give me a few pointers?

    Kind regards,
    Gerard

  2. #2


    tom_newton's Avatar
    Join Date
    Sep 2006
    Location
    Leeds
    Posts
    4,507
    Thank Post
    871
    Thanked 862 Times in 681 Posts
    Rep Power
    199
    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?

  3. #3

    Join Date
    Jun 2009
    Location
    East Renfrewshire
    Posts
    149
    Thank Post
    22
    Thanked 23 Times in 17 Posts
    Rep Power
    15
    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

  4. #4

    Join Date
    Jun 2009
    Location
    East Renfrewshire
    Posts
    149
    Thank Post
    22
    Thanked 23 Times in 17 Posts
    Rep Power
    15
    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?

  5. #5
    cromertech's Avatar
    Join Date
    Dec 2007
    Location
    Cromer by the coast
    Posts
    731
    Thank Post
    177
    Thanked 109 Times in 97 Posts
    Rep Power
    55
    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 12:21 PM.

  6. #6

    Join Date
    Jun 2009
    Location
    East Renfrewshire
    Posts
    149
    Thank Post
    22
    Thanked 23 Times in 17 Posts
    Rep Power
    15
    Oops - I forgot to upload the individual components, but I see you've got round that

    Yep - that looks nice and simple - thanks very much for the suggestion!!

    I'll have a browse at ImageMagick's site on how to get such an effect.


    And if any Inkscape bods know how to go about fixing the "wrong" transparency, that would be appreciated


    Regards,
    Gerard

  7. #7
    cromertech's Avatar
    Join Date
    Dec 2007
    Location
    Cromer by the coast
    Posts
    731
    Thank Post
    177
    Thanked 109 Times in 97 Posts
    Rep Power
    55
    Sorry that was done in photoshop but I'm sure it should be possible with imagemagick.

  8. #8

    Join Date
    Jun 2009
    Location
    East Renfrewshire
    Posts
    149
    Thank Post
    22
    Thanked 23 Times in 17 Posts
    Rep Power
    15
    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??

  9. #9

    Join Date
    Jun 2009
    Location
    East Renfrewshire
    Posts
    149
    Thank Post
    22
    Thanked 23 Times in 17 Posts
    Rep Power
    15
    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??

  10. #10

    Join Date
    Jun 2009
    Location
    East Renfrewshire
    Posts
    149
    Thank Post
    22
    Thanked 23 Times in 17 Posts
    Rep Power
    15
    (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..

  11. #11

    Join Date
    Jun 2009
    Location
    East Renfrewshire
    Posts
    149
    Thank Post
    22
    Thanked 23 Times in 17 Posts
    Rep Power
    15
    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:
+ Post New Thread

Similar Threads

  1. Help need from powershell Gurus
    By rama1712 in forum Internet Related/Filtering/Firewall
    Replies: 0
    Last Post: 4th January 2011, 03:54 PM
  2. TV Gurus? Which one?
    By PiqueABoo in forum General Chat
    Replies: 21
    Last Post: 23rd February 2010, 12:26 PM
  3. Any Sharepoint Gurus Here?
    By Butuz in forum How do you do....it?
    Replies: 4
    Last Post: 24th September 2009, 01:49 PM
  4. Are there any Sharepoint Gurus out there?
    By Ben_Stanton in forum Virtual Learning Platforms
    Replies: 11
    Last Post: 24th January 2009, 11:51 AM
  5. CSS gurus!
    By nickje in forum Web Development
    Replies: 2
    Last Post: 12th June 2007, 12:42 PM

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
  •