Welcome to MacBoardz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Image margins

 
   Macintosh computer (Home) -> Apple Scripts RSS
Next:  Mathematica 7 is now available  
Author Message
Jo_y

External


Since: Jun 22, 2008
Posts: 36



(Msg. 1) Posted: Wed Nov 19, 2008 8:18 am
Post subject: Image margins
Archived from groups: alt>comp>lang>applescript (more info?)

Sometimes its nice to change the desktop-screen image, the only tricky
thing is to center this ones fitting the original size into it by
adding a margin.
I'll do so with a script, where calculates hight x lenght, returning a
value where sets the appropriated lenght of the margin to add.
Someone has ideas with which a application i can do it ? (i prefer
opensource)
(i dont want to cut the image, but to adding a margin, to preserve the
original image)

 >> Stay informed about: Image margins 
Back to top
Login to vote
Jo_y

External


Since: Jun 22, 2008
Posts: 36



(Msg. 2) Posted: Wed Nov 19, 2008 10:37 am
Post subject: Re: Image margins [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks, jollyR.

a very nice gift!
Only strange, that return the desktop.. and set the desktop to.. needs
a try loop; I've not doubt about the quality of your work. Smile

 >> Stay informed about: Image margins 
Back to top
Login to vote
Jolly Roger

External


Since: Sep 09, 2006
Posts: 1943



(Msg. 3) Posted: Wed Nov 19, 2008 11:20 am
Post subject: Re: Image margins [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article
,
Jo_y wrote:

> Sometimes its nice to change the desktop-screen image, the only tricky
> thing is to center this ones fitting the original size into it by
> adding a margin.
> I'll do so with a script, where calculates hight x lenght, returning a
> value where sets the appropriated lenght of the margin to add.
> Someone has ideas with which a application i can do it ? (i prefer
> opensource)
> (i dont want to cut the image, but to adding a margin, to preserve the
> original image)

You could just use some routines I've already written to set the desktop
pictures in System Preferences, which means you don't have to worry
about sizing and so on:

<http://jollyroger.kicks-ass.org/Desktop_Pictures.zip>

Enjoy.

--
Send responses to the relevant news group rather than email to me.
E-mail sent to this address may be devoured by my very hungry SPAM
filter. Due to Google's refusal to prevent spammers from posting
messages through their servers, I often ignore posts from Google
Groups. Use a real news client if you want me to see your posts.

JR
 >> Stay informed about: Image margins 
Back to top
Login to vote
Jolly Roger

External


Since: Sep 09, 2006
Posts: 1943



(Msg. 4) Posted: Wed Nov 19, 2008 5:47 pm
Post subject: Re: Image margins [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article
,
Jo_y wrote:

> Thanks, jollyR.

Welcome. : )

> a very nice gift!
> Only strange, that return the desktop.. and set the desktop to.. needs
> a try loop; I've not doubt about the quality of your work. Smile

Hmm... I don't recall putting a try block in that code.

Did the copy you downloaded have a try block in it somewhere?

Are are you saying you needed to add a try block to it to make it work
somehow??

Color me "confused"! : )

--
Send responses to the relevant news group rather than email to me.
E-mail sent to this address may be devoured by my very hungry SPAM
filter. Due to Google's refusal to prevent spammers from posting
messages through their servers, I often ignore posts from Google
Groups. Use a real news client if you want me to see your posts.

JR
 >> Stay informed about: Image margins 
Back to top
Login to vote
Jean-Marie Schwartz

External


Since: Jun 07, 2007
Posts: 14



(Msg. 5) Posted: Thu Nov 20, 2008 4:25 am
Post subject: Re: Image margins [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Vous lisez mes messages et vous faites bien. Le 19/11/08 17:18, Jo_y a
écrit :

> Sometimes its nice to change the desktop-screen image, the only tricky
> thing is to center this ones fitting the original size into it by
> adding a margin.
> I'll do so with a script, where calculates hight x lenght, returning a
> value where sets the appropriated lenght of the margin to add.
> Someone has ideas with which a application i can do it ? (i prefer
> opensource)
> (i dont want to cut the image, but to adding a margin, to preserve the
> original image)

Hi there!

Imagine Photo is probably what you need.
Read more at <http://www.yvs.eu.com/>.
Hope this helps!
--
Jean-Marie

«Step By Step» (ROXO)
 >> Stay informed about: Image margins 
Back to top
Login to vote
Jo_y

External


Since: Jun 22, 2008
Posts: 36



(Msg. 6) Posted: Thu Nov 20, 2008 9:15 am
Post subject: Re: Image margins [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> > Only strange, that return the desktop.. and set the desktop to.. needs
> > a try loop; I've not doubt about the quality of your work. Smile


> Did the copy you downloaded have a try block in it somewhere?

no. there wasn't a try loop in any of these blocks.

> Are you saying you needed to add a try block to it to make it work
> somehow??

yes. But, thanks anyway for the gift. I'll make a gift to you too:


tell application "Finder"
set pic_files to {"jpg", "tif", "tiff", "png"}
set HD to name of startup disk
activate me
set collapsed of every window to true
tell application "System Events" to set visible of every application
process whose frontmost is true and visible is true to false
set fr_ to choose folder with prompt "Choose a main folder where
contains subfolders with images" default location (path to pictures
folder)
repeat
set a to count of items in container fr_
set this_item to item a of container fr_
if class of this_item is folder then
set rand_f to (random number of a) as integer
if rand_f is 0 then set rand_f to 1
set rand_f to rand_f as number
set this_r to item rand_f of container fr_
set this_r to this_r as text
repeat
set i to count every item in alias this_r
set rand_nr to (random number of i) as integer
if rand_nr is 0 then set rand_nr to 1
set rand_nr to rand_nr as number
set the_desk_f to item rand_nr of alias this_r
if name extension of the_desk_f is in pic_files then
set the desktop picture to the_desk_f
display dialog "Fix image ?" buttons {"Yes", "No"}
set but_y to the button returned of the result
if but_y is "Yes" then
exit repeat
end if
end if
end repeat
exit repeat
end if
end repeat
end tell
 >> Stay informed about: Image margins 
Back to top
Login to vote
Jo_y

External


Since: Jun 22, 2008
Posts: 36



(Msg. 7) Posted: Thu Nov 20, 2008 9:21 am
Post subject: Re: Image margins [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> Hi there!
>
> Imagine Photo is probably what you need.
> Read more at <http://www.yvs.eu.com/>.
> Hope this helps!
> --
> Jean-Marie

Hey Jean,
i've this baby on my HardDisc, but first tests were unsuccessful..
thanks to you too.
 >> Stay informed about: Image margins 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Image Info help - Having problems making a droplet work with Image Info 3.1. Any help would be appreciated. RUNNING PANTHER 10.3.3 The script that doesn't work will return an odd answer for colorMode such as <<contstant ****gray>> (fro greyscale). It seems t...

AS Studio and image view - In an as studio app, how do i get the path to a file dropped into an image view. What I am trying to do is this: Open as studio app, operator drops a screenshot into image view app passes this as a path to QuarkXpress. Any help appreciated. Thanks Mar...

Image Events Apple Scripts - I pulled some sample applescripts from the Apple Web sites for scripting the new Image Events Ap (SIPS) that comes with Panther. I get uneven results, and I am trying to decide if it is my system install, my poor understanding of Apple script, or..

Script mounts disk image mounts once, but fails on second .. - I've tried everything I can think of before wasting your time by asking for help, but I can't find any solution to this mystery, and will be grateful for any advice on solving this one. I am trying to write a script to run a Classic program that uses a C...

Changing image views in AppleScript Studio - I am trying to set up a simple Applescript studio application that changes a series of images depending upon user input. I have the following code snippet to change the image(s): set image of image view "Arrow1" of window "Main" ...
   Macintosh computer (Home) -> Apple Scripts All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]