sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] ImageTrimmer

    Scheduled Pinned Locked Moved Plugins
    364 Posts 58 Posters 228.2k Views 58 Watching
    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.
    • simon le bonS Offline
      simon le bon
      last edited by

      Dear Tig,
      Even if I comment rarely, I have a great respect for your production and your generosity.
      Each tool you make, I feel how was we able to do without it.
      This is presently one more time the case.

      Thank yu so much,

      simon.

      1 Reply Last reply Reply Quote 0
      • shuraS Offline
        shura
        last edited by

        This is just overwhelming. I was wanting this feature for so long... thank you TIG for making this happen!

        As I understand the prcedure, the way to trace a silhouette is to make an inverted transparency for it. With Flatten and Cleanup I get a nice result. Sadly I did'nt get Simplify Contours to work, maybe wrong angle?

        ( )

        jump.jpgjumpclose.jpg

        1 Reply Last reply Reply Quote 0
        • Dave RD Offline
          Dave R
          last edited by

          Very cool, TIG. Thank you.


          http://farm6.static.flickr.com/5090/5267654380_8f51fcd496.jpg

          Etaoin Shrdlu

          %

          (THERE'S NO PLACE LIKE)

          G28 X0.0 Y0.0 Z0.0

          M30

          %

          1 Reply Last reply Reply Quote 0
          • pilouP Offline
            pilou
            last edited by

            Astonished package! 👍 😲 😎

            Frenchy Pilou
            Is beautiful that please without concept!
            My Little site :)

            1 Reply Last reply Reply Quote 0
            • mitcorbM Offline
              mitcorb
              last edited by

              Out of the Blue!
              Thank you!

              I take the slow, deliberate approach in my aimless wandering.

              1 Reply Last reply Reply Quote 0
              • srxS Offline
                srx
                last edited by

                That is great for png trees shadows. Thank you.

                www.saurus.rs

                1 Reply Last reply Reply Quote 0
                • thomthomT Offline
                  thomthom
                  last edited by

                  This is great! It's been asked for for such a long time.
                  How about an option to simply the edges - make the resulting silhouette simpler?

                  You can use the Douglas-Peucker algorithm port I used in Edge Tools:
                  http://forums.sketchucation.com/viewtopic.php?f=323&t=24593#p210736

                  Thomas Thomassen — SketchUp Monkey & Coding addict
                  List of my plugins and link to the CookieWare fund

                  1 Reply Last reply Reply Quote 0
                  • TIGT Offline
                    TIG Moderator
                    last edited by

                    @thomthom said:

                    This is great! It's been asked for for such a long time.
                    How about an option to simply the edges - make the resulting silhouette simpler?
                    You can use the Douglas-Peucker algorithm port I used in Edge Tools:
                    http://forums.sketchucation.com/viewtopic.php?f=323&t=24593#p210736

                    Thanks for the tip... At the moment it slavishly follows every pixel!
                    This is only v1.0 so I'm sure there are lots of improvements possible.
                    My use of using one function specific small Java .jar executables reading 'ini' files to pass arguments etc seems to work better than I expected... So far in alphabetical order, there's...
                    Bumpmapper.jar and BumpmapperInverted.jar to make gray-scale bumpmap pngs from imagefiles.
                    EdgeDetector.jar that finds a given png's edges and makes the 'edged' version and a .dat file = 01's used by SUp.
                    Gifxtractor.jar that makes pngs of all frames in a given animated gif file.
                    Thumbnailer.jar that makes a 64x64 thumbnail of an image.
                    ThumbnailerRGB.jar that makes a 64x64 thumbnail of a color from its RGB values.
                    UnZipDirectory.jar that uncompresses zip files OR skm files.
                    ZipDirectory.jar that compresses zip files OR skm files in a given folder.
                    Any ideas for other similar 'jar' tools always welcomed - I only taught myself Java in the last week or two, specifically to do image manipulation parallel to Ruby, but I'm sure there are other possible uses too... 🤓

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • thomthomT Offline
                      thomthom
                      last edited by

                      You've made a great deal of tools there. Too bad my apartment is such a mess still - don't get much time to look at all these new goodies.

                      Thomas Thomassen — SketchUp Monkey & Coding addict
                      List of my plugins and link to the CookieWare fund

                      1 Reply Last reply Reply Quote 0
                      • shuraS Offline
                        shura
                        last edited by

                        With that .jar business I resign right away. just want to put another +1 here: simplifying edges? Oh yes please! (drooling)

                        1 Reply Last reply Reply Quote 0
                        • TIGT Offline
                          TIG Moderator
                          last edited by

                          I had dallied with some outline simplification ideas... but brought v1.0 to market without that functionality as my brain hurt.
                          I'll think about it again - e.g. even a simple square hole 32x32 pixels currently has 128 edges when 4 would do!!
                          A square hole on the diagonal has 256 edges when 4 would do!!!
                          I'm sure I can clone some ideas from others' code 😉 😄

                          TIG

                          1 Reply Last reply Reply Quote 0
                          • thomthomT Offline
                            thomthom
                            last edited by

                            @tig said:

                            I'll think about it again - e.g. even a simple square hole 32x32 pixels currently has 128 edges when 4 would do!!
                            A square hole on the diagonal has 256 edges when 4 would do!!!
                            I'm sure I can clone some ideas from others' code 😉 😄

                            With the simplification algorithm I linked to, then those 128 edges should become 4. You feed it a set of points that form a curve (for separate each curve into sets and you get a simplified set.

                            Thomas Thomassen — SketchUp Monkey & Coding addict
                            List of my plugins and link to the CookieWare fund

                            1 Reply Last reply Reply Quote 0
                            • CadFatherC Offline
                              CadFather
                              last edited by

                              speechlessly amazing!

                              1 Reply Last reply Reply Quote 0
                              • TIGT Offline
                                TIG Moderator
                                last edited by

                                Here's v1.1 http://forums.sketchucation.com/viewtopic.php?p=294815#p294815
                                It's got an 'outline simplifier' option added.
                                This is also available a separate tool to simplify the outlines of existing ImageTrimmed components.
                                See the notes for details...
                                [Thanks to ThomThom and Douglas-Peucker fro the simplification algorithm ideas...]

                                TIG

                                1 Reply Last reply Reply Quote 0
                                • TIGT Offline
                                  TIG Moderator
                                  last edited by

                                  @cadfather said:

                                  not sure what happened but when run, the script opened edge 'detector.jar' file and there it stayed..
                                  it opened with winrar so will check this out

                                  You need to have Java enabled on you computer - it usually is...
                                  Did you extract most files into SKMtools subfolder as the instructions...
                                  The script doesn't open 'EdgeDector.jar' - rather it should 'execute' it as it's a very small app that does just one thing ?
                                  What OS system are you using ? XP ??
                                  What version of IE do you have ?
                                  What version of SUp ? I guess NOT 9.1 😒

                                  TIG

                                  1 Reply Last reply Reply Quote 0
                                  • CadFatherC Offline
                                    CadFather
                                    last edited by

                                    not sure what happened but when run, the script opened edge 'detector.jar' file and there it stayed..
                                    it opened with winrar so will check this out

                                    EDIT: yes if winrar (i guess any other zipping app as well) is set to open jar files too - trimmer will run winrar -- uncheking the file association makes trimmer work fine

                                    1 Reply Last reply Reply Quote 0
                                    • CadFatherC Offline
                                      CadFather
                                      last edited by

                                      well TIG, with the likes of you, it feels like SU 10.2! 😆

                                      1 Reply Last reply Reply Quote 0
                                      • T Offline
                                        tomasz
                                        last edited by

                                        Thanks for the interesting plugin and the inspiration TIG!

                                        @tig said:

                                        I only taught myself Java in the last week or two

                                        Two weeks is not that much. I will give it a try!

                                        Author of [Thea Render for SketchUp](http://www.thearender.com/sketchup)

                                        1 Reply Last reply Reply Quote 0
                                        • TIGT Offline
                                          TIG Moderator
                                          last edited by

                                          CADfather

                                          I have looked at your '.jar' issue... I can reproduce it! IF I let a 'zip/unzip' application like AlZip or WinRar 'poach' the '.jar' file-type as one that it will open. If so then when Ruby tries to 'open' a '.jar' file instead of it 'executing' in Java [like it should], it 'opens' in the decompression application...

                                          The solution = look at your WinRar settings and ensure '.jar' is NOT one of its file-types for opening...

                                          TIG

                                          1 Reply Last reply Reply Quote 0
                                          • CadFatherC Offline
                                            CadFather
                                            last edited by

                                            thanks TIG, that's exactly what i did - (perhaps wasn't too clear in the edit)

                                            one specu-question: could you, adjust the sampling rate/area of the script? suppose you didn't want so much precision, it could perhaps speed up the trimming process - having said that, the simplifier is well integrated
                                            once the trim is achieved

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

                                            Advertisement