• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[Plugin] ImageTrimmer

Scheduled Pinned Locked Moved Plugins
364 Posts 58 Posters 228.1k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    davidlouis
    last edited by 23 Jan 2011, 20:59

    Fantastic! That seems to have sorted it... πŸ˜„

    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. πŸ‘

    Dave

    1 Reply Last reply Reply Quote 0
    • T Offline
      TIG Moderator
      last edited by 25 Jan 2011, 10:15

      V2.1 is now available http://forums.sketchucation.com/viewtopic.php?p=293677#p293677
      'Simplified image' - a rare error on delete edge is now trapped.
      Please get the new version from this link...

      TIG

      1 Reply Last reply Reply Quote 0
      • K Offline
        krath
        last edited by 11 Feb 2011, 12:21

        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:

        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)

        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


        2


        3

        1 Reply Last reply Reply Quote 0
        • T Offline
          TIG Moderator
          last edited by 11 Feb 2011, 12:29

          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...]

          TIG

          1 Reply Last reply Reply Quote 0
          • K Offline
            krath
            last edited by 11 Feb 2011, 12:59

            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?

            1 Reply Last reply Reply Quote 0
            • T Offline
              TIG Moderator
              last edited by 11 Feb 2011, 13:31

              @krath said:

              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 πŸ˜•

              TIG

              1 Reply Last reply Reply Quote 0
              • K Offline
                krath
                last edited by 11 Feb 2011, 13:57

                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. 😲

                1 Reply Last reply Reply Quote 0
                • T Offline
                  TIG Moderator
                  last edited by 11 Feb 2011, 14:12

                  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... πŸ˜•

                  TIG

                  1 Reply Last reply Reply Quote 0
                  • OxerO Offline
                    Oxer
                    last edited by 11 Feb 2011, 20:13

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

                    Console error

                    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.

                    "The result is the end what is important is the process" by Oxer
                    [http://www.oxervision.blogspot.com/(http://www.oxervision.blogspot.com/)]

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      TIG Moderator
                      last edited by 11 Feb 2011, 20:59

                      Thanks Oxer... I've got some other MAC users [via PM] investigating the issue... watch this space... πŸ˜’

                      TIG

                      1 Reply Last reply Reply Quote 0
                      • ely862meE Offline
                        ely862me
                        last edited by 11 Feb 2011, 22:47

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


                        banana_tree.rar

                        Elisei (sketchupper)


                        Before no life was done on Earth it was THE LIFE ITSELF...GOD
                        Come and See EliseiDesign

                        1 Reply Last reply Reply Quote 0
                        • T Offline
                          TIG Moderator
                          last edited by 11 Feb 2011, 23:58

                          @ely862me said:

                          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.skpbanana_tree_trimmed.PNG

                          TIG

                          1 Reply Last reply Reply Quote 0
                          • ely862meE Offline
                            ely862me
                            last edited by 12 Feb 2011, 07:04

                            Thank you very much for heads up and for a nice plugin !!

                            Elisei (sketchupper)


                            Before no life was done on Earth it was THE LIFE ITSELF...GOD
                            Come and See EliseiDesign

                            1 Reply Last reply Reply Quote 0
                            • T Offline
                              TIG Moderator
                              last edited by 13 Feb 2011, 14:49

                              Here's v2.2 http://forums.sketchucation.com/viewtopic.php?p=294815#p294815 - follow the links to the 'download' page in SKMtools......
                              The MAC jar file execution has at last been addressed
                              [My thanks to Dave R for helping with the MAC testing etc πŸ˜„ ]
                              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...

                              TIG

                              1 Reply Last reply Reply Quote 0
                              • K Offline
                                krath
                                last edited by 13 Feb 2011, 18:33

                                Flawless !!!
                                It now runs without Interruptions. Prefect results - especially with the ImageTrimmer-Simplifier afterwards. πŸ‘
                                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

                                1 Reply Last reply Reply Quote 0
                                • T Offline
                                  TIG Moderator
                                  last edited by 13 Feb 2011, 19:24

                                  @krath said:

                                  Flawless !!!
                                  It now runs without Interruptions. Prefect results - especially with the ImageTrimmer-Simplifier afterwards. πŸ‘
                                  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'
                                  πŸ˜’
                                  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] πŸ˜’
                                  [Actually Oxer HAD spotted the nature of the problem a few weeks ago, BUT "the penny hadn't dropped"... πŸ˜’ πŸ˜’ ]

                                  TIG

                                  1 Reply Last reply Reply Quote 0
                                  • OxerO Offline
                                    Oxer
                                    last edited by 13 Feb 2011, 23:51

                                    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.

                                    "The result is the end what is important is the process" by Oxer
                                    [http://www.oxervision.blogspot.com/(http://www.oxervision.blogspot.com/)]

                                    1 Reply Last reply Reply Quote 0
                                    • K Offline
                                      krath
                                      last edited by 14 Feb 2011, 14:52

                                      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. πŸ€“

                                      1 Reply Last reply Reply Quote 0
                                      • T Offline
                                        TIG Moderator
                                        last edited by 14 Feb 2011, 19:22

                                        @krath said:

                                        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. πŸ€“

                                        OK - but it works now as the PC and MAC versions are differentiated by the inclusion or not of a trailing '/' after 'file:' πŸ˜„

                                        TIG

                                        1 Reply Last reply Reply Quote 0
                                        • K Offline
                                          krath
                                          last edited by 15 Feb 2011, 08:02

                                          Yes, it does!
                                          Thanks to your persistence in solving the problem. πŸ˜„

                                          1 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 5
                                          • 6
                                          • 7
                                          • 8
                                          • 9
                                          • 18
                                          • 19
                                          • 7 / 19
                                          • First post
                                            Last post
                                          Buy SketchPlus
                                          Buy SUbD
                                          Buy WrapR
                                          Buy eBook
                                          Buy Modelur
                                          Buy Vertex Tools
                                          Buy SketchCuisine
                                          Buy FormFonts

                                          Advertisement