Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9158845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:20:51+00:00 2026-06-17T13:20:51+00:00

I need to resize texture image files after COLLADA Export in Sketchup Ruby. Is

  • 0

I need to resize texture image files after COLLADA Export in Sketchup Ruby.

Is there a way to read images (PNG, JPG) from disk, resize them and save them back to disk using plain Sketchup Ruby API?

I know how to do the file read/write, just have no idea about the “image decode, resize, encode” -part.

Most image resize examples I’ve found involve some image processing library or gem that is not available in Sketchup ruby distribution.. Would be nice to have a portable solution that would be easy to distribute with my SU Ruby plugin.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:20:52+00:00Added an answer on June 17, 2026 at 1:20 pm

    The SketchUp Ruby API doesn’t include methods to manipulate images directly.

    You can create materials in the model which uses textures, but not just load an image resource.

    There is a method you might be able to use: Material.write_thumbnail (SU8M1+), based on your description you could iterate over the materials in the model and export thumbnails.

    However, the method has an very annoying limitation:

    Material.write_thumbnail has a behaviour which limits it usability in
    some scenarios.

    If you specify a dimension equal or larger to either the width or
    height of the original, then the method fails. In other words, the
    resolution argument must be 1px smaller than the smallest unit of
    either the length or width of the original texture.

    This produces problems with textures with a big ratio between width
    and height. If you want to produce thumbnails that are max 128x128px
    and the material you generate the thumbnail for has a texture of
    64x512px then it fails. As for that given texture the max size for the
    thumbnail would be 63px (1px smaller than smallest dimension.) –
    resulting in a thumbnail of 8×63.

    For that reason the method should have ideally accepted width and
    height for the thumbnail in order to be truly usable. Alas. Hopefully
    this will be improved in a later version.

    (More info on material in SketchUp: http://www.thomthom.net/thoughts/2012/03/the-secrets-of-sketchups-materials/#material-thumbnails)

    To get real control over images when developing SketchUp plugins you do unfortunately need to use a third party library.

    You can look at the plugin “Texture Resizer” by Aerilius who’s done a lot of work in this area. http://sketchucation.com/forums/viewtopic.php?f=323&t=40720#p360679

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I need to resize or reposition a UIView, is there a better way
I php need to resize an image so that both width and height after
I need to resize PNG, JPEG and GIF files. How can I do this
I need to resize jpg images with Python without losing the original image's EXIF
I need resize this image proportionally heigth 411px. how do this? [HttpPost] public WrappedJsonResult
I need to resize an image to display on different pages in different sizes,
I need to resize and crop an image to a specific width and height.
I need to resize images in php using GD to a fixed size but
I need to resize an image, but the image quality cannot be affected by
I need to take an uploaded image, resize it, and save it to the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.