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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:34:07+00:00 2026-05-18T07:34:07+00:00

Is there any algorithm for arranging a lot of small images with different dimensions

  • 0

Is there any algorithm for arranging a lot of small images with different dimensions and group them into a larger one?
Anyone have any idea from where should i start investigating?


EDIT:
Basically i want to make something like this http://www.google.ro/images/srpr/nav_logo27.png in PHP. I’m not really expecting such complexity.
I’m gonna use the image as a CSS sprite, if it makes any difference.

  • 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-05-18T07:34:08+00:00Added an answer on May 18, 2026 at 7:34 am

    Using an optimization algorithm could be an overkill for your problem. Coding an optimization algorithm will require a lot of pre-study. Even implementing a ready library could be a big problem to tackle.

    You can devise a heuristic, by yourself:
    Use the large image’s width and height as your input.
    Think of it as if you fill up each row and continue to the next row once the row is filled up.
    And start inserting images one by one.

    If you use an algorithm the final image will be more optimized. Smaller in size. But the difference would not be much different if your images do not vary a lot in dimensions.

    If your image dimensions do vary a little, order them according to their most varying dimension (either width or height). Then start inserting the images in that order.

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

Sidebar

Related Questions

Is there any algorithm for converting 2D video into 3D video (for viewing using
So we have Histograms... Is there any algorithm to generate original image from them?
Is there any simple algorithm to determine the likeliness of 2 names representing the
Are there any named/famous/particularly good algorithms for organizing email messages into threads? I'm looking
Can someone post any simple explanation of cache aware algorithms? There are lot of
Is there any algorithm to compute the nth fibonacci number in sub linear time?
Is there any algorithm in c# to singularize - pluralize a word (in english)
So I have an image like this (source: bytearray.org ) Is there any algorithm
Are there any algorithms that can help with hierarchical clustering? Google's map-reduce has only
Are there any algorithms or tools that can increase the resolution of an image

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.