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

  • Home
  • SEARCH
  • 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 6863923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:50:50+00:00 2026-05-27T02:50:50+00:00

I am looking for a very quick way to render dynamic images from small

  • 0

I am looking for a very quick way to render dynamic images from small tiles placed on some background (imagine dynamically rendering a chess game and sending images after each player makes a move).
So the procedure seems to be quite simple:
1. Take some background
2. Put transparent images of chess figures from top to bottom using image offsets (to have correct perspective)
3. Save the whole picture as gif

Tried using imagemagick:

using something similar to:

convert -page 176x220 -gravity SouthWest 1.png   -page +35+30 -gravity SouthWest 1.png     -page +62+50       1.png   -page +10+55 1.png -background none  -compose DstOver  -flatten      result.gif

And graphics magick in similar way:
gm convert … -page+35+-30 -flatten..

But was not impressed, GraphicsMagick provided better results but:

SERVER:

             user     system      total        real
all:     0.000000   0.000000  47.650000 ( 70.991829)
small:   0.000000   0.000000   6.600000 (  8.110900)
medium:  0.000000   0.000000   6.820000 (  8.494131)
large:   0.000000   0.000000  10.890000 ( 15.818351)
extreme:  0.000000   0.000000  11.160000 ( 19.873541)
biggest:  0.000000   0.000000  11.640000 ( 14.327450)

On local Phenom II x6:

             user     system      total        real
all:     0.000000   0.000000   1.980000 (  0.757320)
small:   0.000000   0.000000   0.330000 (  0.082142)
medium:  0.000000   0.000000   0.380000 (  0.127744)
large:   0.000000   0.000000   0.410000 (  0.147252)
extreme:  0.000000   0.000000   0.440000 (  0.180338)
biggest:  0.000000   0.000000   0.470000 (  0.210802)

Thought maybe the file loading is the issue, tried Rmagick(script from: http://www.imagemagick.org/RMagick/doc/ilist.html#mosaic ):

    require "benchmark"
    require 'RMagick'

    #Demonstrate the mosaic method

    a = Magick::ImageList.new

    26.times do
      a.read("csii/some_asset.miff")
    end


    b = Magick::ImageList.new
    page = Magick::Rectangle.new(0,0,0,0)
    a.scene = 0
    2.times do |i|
        2.times do |j|
            b << a.scale(1)
            page.x = j * b.columns
            page.y = i * b.rows
            b.page = page
            (a.scene += 1) rescue a.scene = 0
        end
    end

    # Make a 5x5 mosaic
    #mosaic = b.flatten_images
    #mosaic.write("mosaic.gif")

    # mosaic.display
    Benchmark.bm(7) do |ben|
      ben.report("tiny:")   {mosaic = b.mosaic}
    end

    exit

The result is even more wierd:
THIS IS FOR A TINY 2*2 tiles image

SERVER:

         user     system      total        real
tiny:   16.210000   0.000000  16.210000 ( 16.982007)

PHENOM:

             user     system      total        real
tiny:    0.000000   0.010000   0.010000 (  0.001637)

ADDITIONAL INFO:

INPUT FILE FORMATS: tried png and miff

OUTPUT: must be gif

SERVER: 1 XEON core on VPS ~2.2Ghz

PHENOM: 6* 3.2Ghz

Version differences:

Phenom
Version: ImageMagick 6.5.7-8 2010-12-02 Q16 http://www.imagemagick.org

Server 
Version: ImageMagick 6.5.1-0 2010-12-02 Q16 OpenMP http://www.imagemagick.org

QUESTIONS

  1. Any ideas for the up to 10000 times reduction in speed?
  2. Any ideas of how I could achieve this task in any other way(other GM or IM function?) or method (Trying out chunky_PNG now (with oily_png ext.)?
  3. The old 2d games of DOS era could render even more pixels at 60fps, so I guess it should be able to accomplish this on a 2Ghz CPU (200ms would be OK I guess)?
  • 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-27T02:50:50+00:00Added an answer on May 27, 2026 at 2:50 am

    It seems every time I ask a question on SO, the answer comes to me immediately.

    This time it seems the performance issue is because of OpenVz VPS and OpenMP in IM and GM. After recompiling without OpenMP feature, the performance is great on the server.

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

Sidebar

Related Questions

I'm looking for a very easy and quick way to generate some SAML assertions.
Looking to do a very small, quick 'n dirty side project. I like the
Hi I'm looking for a very simple quick (no-plugins though) way to add a
quick and very basic newbie question. If i have list of dictionaries looking like
I am looking for a very fast way to filter down a collection in
I'm looking for a very simple way of determining if the version of Windows
I was looking for a quick way to compute the SHA-256 hash of a
I am looking for a quick way to share code snippets between developers. Visual
Java. I have a very small int array (4 elements). What's the fastest way
Any silverlight text to speech engine available now? I am looking for very simple

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.