[Plugin] ImageTrimmer

Re: [Plugin] ImageTrimmer v2.0 20110123

Postby davidlouis » Sun Jan 23, 2011 9:59 pm

Fantastic! That seems to have sorted it... :D

I am still getting some mumble in the ruby console... This is a near to fresh install of SKP 8 so I don't have many plugins installed...

Hang on... I've got Vray for sketchup and its mentioning syncing of materials so maybe Vray is trying to catch up with the image swaps that your process is doing... If you're creating temp files whilst it happens, Vray might be looking for those when they've been deleted.... hmmm... for now its working just fine for what I need... and vray renders them out just fine too...

I will let you know if I discover anything else.

Thanks again for you help in resolving this. :thumb:

Dave
0

davidlouis 
 

Re: [Plugin] ImageTrimmer v2.1 20110125

Postby TIG » Tue Jan 25, 2011 11:15 am

V2.1 is now available viewtopic.php?p=293677#p293677
'Simplified image' - a rare error on delete edge is now trapped.
Please get the new version from this link...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] ImageTrimmer v2.1 20110125

Postby krath » Fri Feb 11, 2011 1:21 pm

Hello TIG,

I have been reading the whole thread, but I am still not sure, if you have finally been able to resolve the "mac glitches" with OXER.
On my Mac (Snow Leopard 1.6.6) ImageTrimmer gets stuck with an error message.
This is what I do:

1)
After importing and selecting the "test.png" I run ImageTrimmer.
The ruby creates a folder named TrimmedImages containing the selected image.
Also the two .ini files containing the following Pathnames:

/Users/kai/Desktop/TrimmedImages/test.png
/Users/kai/Desktop/TrimmedImages/test

The Ruby Console produces an error message (see first screenshot)

2)
On double-clicking edgeDetector.jar in the SKMtools folder two more files are generated in the TrimmedImages folder:
testEdges].dat
test[Edges].png
the .dat file containing zeros and ones, and the second .png showing the desired contour (second and third screenshot)

############################################################################################
Since this is my first post on this forum I don't want it to lack my appreciation for all of the plugin writers, whose contributions I have been so shamelessly enjoying over the past years. Thanks a lot to all of you!!!
############################################################################################
1.png
0

krath 
 

Re: [Plugin] ImageTrimmer v2.1 20110125

Postby TIG » Fri Feb 11, 2011 1:29 pm

The .jar is working fine when double-clicked [those are the files that it should automatically make for you before going to the next stage] but it's not working properly when UI.openURL() is used.
It's probably down to your Java settings and permissions.
A .jar file will run when its icon is double-clicked and it should 'executed' in a 'command' file.
I don't have access to a MAC but is there a Java control-panel ?
Can you set permissions and so on in that ?
Please go to the SKMtools folder and check that the 'EdgeDetector.jar' has the correct 'properties' for you as a user - should be 'executable by you/others... If not fix it [also do this for all other jar-files in there too...]
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] ImageTrimmer v2.1 20110125

Postby krath » Fri Feb 11, 2011 1:59 pm

thanks for the quick reply,

the "EdgeDetector.jar" file has already the correct Properties.
There is an application called Java-preferences in the utilities folder, but I am nut sure which settings I should change.
It has Settings for Security, Network and - I'm trying to translate since my OS is in german - two options for:
"Run applets" > 1) "within own Process" or 2) "within browser process"
Does that have any relevance?
0

krath 
 

Re: [Plugin] ImageTrimmer v2.1 20110125

Postby TIG » Fri Feb 11, 2011 2:31 pm

krath wrote:thanks for the quick reply,
the "EdgeDetector.jar" file has already the correct Properties.
There is an application called Java-preferences in the utilities folder, but I am nut sure which settings I should change.
It has Settings for Security, Network and - I'm trying to translate since my OS is in German - two options for:
"Run applets" > 1) "within own Process" or 2) "within browser process"
Does that have any relevance?

I don't know.
Try using alternatives and retry 'ImageTrimmer' for each.
If it works one one thane that's the setting you need :)
If you do find the fix I'd appreciate it if you posted the settings as a few other MAC users seem to have issues too - although many don't :?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] ImageTrimmer v2.1 20110125

Postby krath » Fri Feb 11, 2011 2:57 pm

Thank you,

I am fiddling with the settings already, with no luck so far.
I did a quick google search for "setting java permissions osx" and that opens up a whole new scary landscape for me, which I am not sure I should embark upon right now. :shock:
0

krath 
 

Re: [Plugin] ImageTrimmer v2.1 20110125

Postby TIG » Fri Feb 11, 2011 3:12 pm

If there are any MAC users out there successfully using ImageTrimmer then please contribute your settings etc so that other MAC users can benefit too... :?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] ImageTrimmer v2.1 20110125

Postby Oxer » Fri Feb 11, 2011 9:13 pm

Hi again TIG,
The problem persists, it appears the same Console Error:

Captura.jpg


The EdgeDetector.jar file goes if you double-click on it, the permissions are correct, i think the problem on mac is that the plugin don't access to the EdgeDetector.jar file, i can't say you more.
0
"The result is the end what is important is the process" by Oxer
http://www.oxervision.blogspot.com/
User avatar
Oxer 
 

Re: [Plugin] ImageTrimmer v2.1 20110125

Postby TIG » Fri Feb 11, 2011 9:59 pm

Thanks Oxer... I've got some other MAC users [via PM] investigating the issue... watch this space... :roll:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] ImageTrimmer v2.1 20110125

Postby ely862me » Fri Feb 11, 2011 11:47 pm

With big png's just gives me bugsplat,can it be because of my pc(2.8ghz 1gb ram 1gb graphic card) ?
0
Elisei (sketchupper)
____________________________________________________________
Before no life was done on Earth it was THE LIFE ITSELF...GOD
Come and See EliseiDesign
User avatar
ely862me 
Top SketchUcator
 

Re: [Plugin] ImageTrimmer v2.1 20110125

Postby TIG » Sat Feb 12, 2011 12:58 am

ely862me wrote:With big png's just gives me bugsplat, can it be because of my pc (2.8ghz 1gb ram 1gb graphic card) ?

The banana_tree at that size has ~3.5 million pixels that would need processing into viable edges !
At 1/2 the size [scaled in Gimp] it's 1/4 of the pixels and although it's still too many to be sensible it probably won't splat - but it just doesn't do miracles, it just takes time... !
You have a lot of semi-transparent bleeding edges that also up the processing time dramatically - edit those out too - they're probably the biggest processing time killer, as it might have to find all sorts of small loops from the small semi-transparent 'islands' before discarding them.
You also have a lot of other small areas of pixels that will be ignored as edges as they are too thin [<2px] BUT these still need to be examined which slows things down too - so pre-edit the image a bit to simplify it!
[but you probably need 3Gb+ RAM too!]
Here's a result at about 1/2 size - original image, then as trimmed unsimplified and simplified x2.0...
banana_tree.skp
banana_tree_trimmed.PNG
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] ImageTrimmer v2.1 20110125

Postby ely862me » Sat Feb 12, 2011 8:04 am

Thank you very much for heads up and for a nice plugin !!
0
Elisei (sketchupper)
____________________________________________________________
Before no life was done on Earth it was THE LIFE ITSELF...GOD
Come and See EliseiDesign
User avatar
ely862me 
Top SketchUcator
 

Re: [Plugin] ImageTrimmer v2.2 20110213

Postby TIG » Sun Feb 13, 2011 3:49 pm

Here's v2.2 viewtopic.php?p=294815#p294815 - follow the links to the 'download' page in SKMtools......
The MAC jar file execution has at last been addressed :sketchstatic:
[My thanks to Dave R for helping with the MAC testing etc :D ]
On a MAC you might find you are asked if you want to run a particular jar file - if so answer 'yes' - it's a one off prompt per jar-type so it should stop after the first run.

Feedback please...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] ImageTrimmer v2.2 20110213

Postby krath » Sun Feb 13, 2011 7:33 pm

Flawless !!!
It now runs without Interruptions. Prefect results - especially with the ImageTrimmer-Simplifier afterwards. :thumb:
Thanks a lot TIG et al !
If it is not too complicated I would be interested, what the problem was running the scripts on the mac.
Thanks again
0

krath 
 

Re: [Plugin] ImageTrimmer v2.2 20110213

Postby TIG » Sun Feb 13, 2011 8:24 pm

krath wrote:Flawless !!!
It now runs without Interruptions. Prefect results - especially with the ImageTrimmer-Simplifier afterwards. :thumb:
Thanks a lot TIG et al !
If it is not too complicated I would be interested, what the problem was running the scripts on the mac.
Thanks again

It was a bit obscure!
The command UI.openURL('file:/'+path_to_jar) works fine on all PCs AND on MACs where the path doesn't start with a '/' - e.g. PC's 'C:/Program.../...'.
BUT some MAC users install their Plugins in an alternative location which starts with a '/' therefore 'file:/'+path_to_jar fails as it doubles up the '/' to '//' and the file isn't then 'found'
:roll:
So I added an additional test: if 'path_to_jar' starts with a '/' then jar='file:'+path_to_jar else jar='file:/'+path_to_jar.

So in the end a simple problem was masked by lots of other issues - but at least it's fixed [at last] :roll:
[Actually Oxer HAD spotted the nature of the problem a few weeks ago, BUT "the penny hadn't dropped"... :roll: :roll: ]
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] ImageTrimmer v2.2 20110213

Postby Oxer » Mon Feb 14, 2011 12:51 am

Hi TIG,
Finally the problem have been resolved, sometimes you have the solution in front to your eyes but the forest don't let you see it.
Thanks TIG for you perseverance.
0
"The result is the end what is important is the process" by Oxer
http://www.oxervision.blogspot.com/
User avatar
Oxer 
 

Re: [Plugin] ImageTrimmer v2.2 20110213

Postby krath » Mon Feb 14, 2011 3:52 pm

TIG,
on a MAC, the pathname always starts with a '/' because that's the root directory. Volumes follow behind that slash.
Oxer stated two alternative Pathnames on his Mac earlier in this thread, the second of which started with "Library/...".
It should really read "/Library/...".
Hope I don't come across as beeing pedantic; maybe it helps avoiding similar problems in the future. :geek:
0

krath 
 

Re: [Plugin] ImageTrimmer v2.2 20110213

Postby TIG » Mon Feb 14, 2011 8:22 pm

krath wrote:TIG,
on a MAC, the pathname always starts with a '/' because that's the root directory. Volumes follow behind that slash.
Oxer stated two alternative Pathnames on his Mac earlier in this thread, the second of which started with "Library/...".
It should really read "/Library/...".
Hope I don't come across as being pedantic; maybe it helps avoiding similar problems in the future. :geek:

OK - but it works now as the PC and MAC versions are differentiated by the inclusion or not of a trailing '/' after 'file:' :D
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] ImageTrimmer v2.2 20110213

Postby krath » Tue Feb 15, 2011 9:02 am

Yes, it does!
Thanks to your persistence in solving the problem. :D
0

krath 
 

Re: [Plugin] ImageTrimmer v2.2 20110213

Postby driven » Tue Feb 15, 2011 5:54 pm

cheers Tig

dieting is good.jpg


finally I got it to work on 10.5.8, and just incase it saves others some time searching.

java_working_NOW.jpg



john
0
learn from the mistakes of others, you may not live long enough to make them all yourself...

driven 
PluginStore Author
PluginStore Author
 

Re: [Plugin] ImageTrimmer v2.2 20110213

Postby davidlouis » Fri Mar 18, 2011 10:56 am

Hi TIG

I have migrated my version of skp to a new pc running windows 7 (former pc running winxp) and my image trimmer is not working at all.

The tool does appear to start to run on an imported png file (as image) but won't progress to the first prompt to stand up the component etc. It simply stops and allows you to go back to using the skp tools.

Ruby console report is below:

Error: #<Errno::ENOENT: No such file or directory - C:\Users\Apache\Documents\TrimmedImages\Untitled-1[Edges].dat>
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/SKMtools/ImageTrimmer.rb:232:in `readlines'
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/SKMtools/ImageTrimmer.rb:232:in `make_edges'
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/SKMtools/ImageTrimmer.rb:185:in `process_image'
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/SKMtools/ImageTrimmer.rb:162:in `initialize'
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/SKMtools/ImageTrimmer.rb:759:in `new'
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/SKMtools/ImageTrimmer.rb:759

This is a strange error about not being able to find a file...
This runs just fine on my laptop with xp using the same file so i'm guessing that this is operating system based?
Also when migrating the plugins, i did a simple copy and paste into the skp directory on the new machine... don'tknow if any files should be elsewhere given that you use a bit of java on this one.

Any help will be much appreciated....
Thanks

Dave
0

davidlouis 
 

Re: [Plugin] ImageTrimmer v2.2 20110213

Postby TIG » Fri Mar 18, 2011 11:08 am

David

This indicates that on your new PC either there is not a suitable version of Java installed, or it's not properly enabled, or if it is it does not have its options set correctly to allow 'jar' files to execute. There are several posts about what Java settings to have to allow all of this family of tools working - they all use 'jar' - Java executable applets - that you setting must allow to run in 'Java options'...

Also please check access-rights to the Plugins folder and the SKMtools subfolder and its contents, which must allow read/write/execute etc for everything and everyone... This could cause problems to as some temporary files are written here.

Please come back either with your fix or continuing problems... :geek:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] ImageTrimmer v2.2 20110213

Postby davidlouis » Fri Mar 18, 2011 12:02 pm

TIG

Forgive me but i am no expert in these matters.
I have checked and got the latest java and it is enabled so far as I can see.
As far as permissions are concerned, I have little experience in setting specific tags for particular apps but as i mentioned before, the other installed plugin in winxp worked straight out the 'box' and required no additional changes so i'm not sure where to even start switching things in the new windows 7 OS....

Is there anyone out there who has got this working on win7 pro 64bit and skp 8? Did you have to do anything fancy to get it to work?
Maybe they can help point me in the right direction.

Java is currently installed in the x86 directory so as far as i know this is the 32bit version... might it help to get the 64bit version?

Dave
0

davidlouis 
 

Re: [Plugin] ImageTrimmer v2.2 20110213

Postby Dave R » Fri Mar 18, 2011 12:42 pm

Dave, one of the big changes between XP and 7 is that in 7, you'll have to set permissions to make changes to folders. At least the ones that are in the Program folder. As TIG mentioned, make sure you have permissions set to allow changes to the folders he indicated. I did a little thing here about installing zipped plugins and have a paragraph about setting those permissions. Maybe it will help.
0
Etaoin Shrdlu


%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] ImageTrimmer v2.2 20110213

Postby unclebim » Fri Mar 18, 2011 12:47 pm

davidlouis wrote:TIG

Forgive me but i am no expert in these matters.
I have checked and got the latest java and it is enabled so far as I can see.
As far as permissions are concerned, I have little experience in setting specific tags for particular apps but as i mentioned before, the other installed plugin in winxp worked straight out the 'box' and required no additional changes so i'm not sure where to even start switching things in the new windows 7 OS....

Is there anyone out there who has got this working on win7 pro 64bit and skp 8? Did you have to do anything fancy to get it to work?
Maybe they can help point me in the right direction.

Java is currently installed in the x86 directory so as far as i know this is the 32bit version... might it help to get the 64bit version?

Dave


I had problems running the plugin in Windows 7 and SU 8 Pro, although all permissions were set right for my user account and Java was updated. I solved the problem running SU from the master administrator account and I still switch user accounts in order to use the plugin. Probably that is not the best thing to do but it works.
0
User avatar
unclebim 
 

Re: [Plugin] ImageTrimmer v2.2 20110213

Postby TIG » Fri Mar 18, 2011 1:09 pm

It is recommended that you as a 'user' have 'administrator rights'.
If you do not / cannot, then at least have the rights to the SKMtools folder and it's contents' permissions set so 'users' can read/write/execute files from that folder...
A automatic Windows [Vista & 7] 'Program Files' set up is often too draconian in limiting your permissions for any program folders/files in it...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] ImageTrimmer v2.2 20110213

Postby davidlouis » Fri Mar 18, 2011 2:02 pm

unclebim

You are indeed correct. This works fine from the master administrator account but for some reason, not from my account in which I am in fact specified as an administrator... ?
I am also listed as having full control of the SKMtools folder.

For some reason the 'full' rights are not being given to me.
There are a number of write ups about this on the net... I have followed a few tips on gain full ownership of the OS but no success as yet...

If anyone has any bright ideas on how to solve this please step up.... I am not sure that I would be able to live with having to switch users to have to use a plugin...

Dave
0

davidlouis 
 

Re: [Plugin] ImageTrimmer v2.2 20110213

Postby TIG » Fri Mar 18, 2011 3:04 pm

David

Have you tried running 'Sketchup as Administrator' [right-click icon menu item] ?
Does that change anything ?
If so change the Sketchup exe [shortcut icon on your desktop will do] to 'run as administrator' permanently.
Then after running it, change it back to be 'ordinary' - this may well kick things into allowing you to run it as expected.
Have you also looked down the Java options for your account?
I have a similar setup to you, without any problems.
Here are my setting that work
Capture.PNG
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] ImageTrimmer v2.2 20110213

Postby davidlouis » Fri Mar 18, 2011 3:44 pm

TIG...

That's it... working just fine now... ! :D
Incidently, my java settings were the same as yours so i don't think that is to blame. And...before I read your post, as a further test to using the main admin account, I created a new user (with administrator rights)and logged in and everything worked just fine.
So i'm guessing that somewhere in my normal account some access rights are messed up preventing the writing of temp files and it would just be a matter of finding out where to switch things... but i haven't got the time or patience for that.

If i follow your advice about setting the shortcut to run as an admistrator, things trim just fine... :D I had to reactivate my 1001bit tools but that was easy... so i think i'm just going to leave it running as such for now and one day if i ever to an OS reinstall I'll correct the problem properly.

unclebim, you may have success using the same 'patch'... at least it will be an end to your switching users...

Thanks again... have a good weekend

Dave
0

davidlouis 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

PreviousNext


 

Return to Plugins

Who is online

Users browsing this forum: dbndbndbn, Ton Baeten and 7 guests

Visit our sponsors: