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 8012743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:25:16+00:00 2026-06-04T19:25:16+00:00

I have this code: marginsBetween = 20 background = ‘#000000’ columns = 6 rows

  • 0

I have this code:

marginsBetween = 20
background = '#000000'

columns = 6
rows = 12

collage = images.montage {
  self.geometry = '+' + (marginsBetween/2).to_s + '+' + (marginsBetween/2).to_s
  self.tile = columns.to_s + 'x' + rows.to_s
  self.background_color = background
}

images is an ImageList with 96 images in it, populated as follows

images = ImageList.new()
urls.each do |url|
  images << Image.read(url)[0]
end

Where urls is just an array of image URLs

For some reason, after calling collage.flatten_image and saving that resulting image, I only have 24 photos in the grid with whitespace filling the rest. Has anyone seen this behavior before?

EDIT:
It appears that this only happends with 96 images…. Any other number works fine

  • 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-04T19:25:19+00:00Added an answer on June 4, 2026 at 7:25 pm

    Figured it out.

    Looks like in some cases, montage returns an array of images. You need to deal with it somehow.

    In my case, I used resample to get the correct DPI and merge the images in one go.

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

Sidebar

Related Questions

I have this code: <div class = content-dir-item> <p>Text input</p> <img src=./images/email.png class =
I have this code in one of my NSManagedObjects : if (self.tempImageStorage) { return
I have this code: columns.ForeignKey(p => p.SomeProperty, new SelectList(new[] { 0, 1, 2, 3,
have this code: template<typename T, template<typename, typename> class OuterCont, template<typename, typename> class InnerCont, class
i have this code local strs = my dog print (string.gsub( strs , ,%20))
I have this code : h1, h2, h3, h4{ color: red; } .message_rouge h1,
I have this code: std::string name = kingfisher; char node_name[name.size()+1]; strcpy(node_name,name.c_str()); node_name[name.size()] = '\0';
I have this code: level = {0, 0, 0, 0, 1, 0, 0, 0,
I have this code: public function getRecurringEventsByGrouped($grouped){ $query = SELECT * FROM `event` AS
I have this code import com.crystaldecisions.reports.sdk.ReportClientDocument; ... ReportClientDocument rpt = new ReportClientDocument(); rpt.open(reportPath+fileName, 0);

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.