Load large image like size 1.5GB and width 81000 and height 180000

Hi
Tried with imagemagick but it works only for 300DPI other DPI images not worked.

I have 2 images
1.tif - 8100X8100 size
2.tif - 8100X8100 size

How to load 2 images and when scroll 1.tif fir scroll after that 2,tif will scroll continouly without any delay, is it possible? If yes. how to do that.

Can we customize the scroll speed ?

Thanks

Once you’ve converted them to textures it’s easy. Simply SDL_RenderCopy() enough textures to flll the screen, tiling in x and/or y directions as appropriate. Scrolling is just a case of adjusting the positions of the destination rectangles according to the time or frame count.

The tricky part is initially splitting the Tiffs into small enough tiles. Google found this which looks useful.

I didn’t experiment it myself, so I can only give you very general advice.
The main point for you is to have smooth scrolling. Hence you have to keep up a fixed framerate, usually 60FPS, but very often a lower rate like 30FPS is acceptable. I am assuming here that you know how to program a constant framerate using delays.

There are two kinds of situations:

  • the user controls the scrolling, and often stops. Then you should take advantage of the moments when the user stops to perform your tasks: loading images, clipping, freeing images that are not used anymore, etc.

  • the scrolling never stops. Then it’s more difficult, because all your operations must be split into smaller tasks: each task should complete within a frame, that is, less than 16ms or 33ms. You have to test whether you can load your image in less than 33ms. If not, it means you first have to prepare your data before the scrolling starts by splitting the image into smaller files, until you reach this less than 33ms loading.

Another option is to do all loading tasks in a separate thread/process, and hope that the OS is smart enough not to block when I/O are performed. I wouldn’t count on this, but I may be wrong.

The tricky part is initially splitting the Tiffs into small enough tiles. Google found this which looks useful.

Its very helpful. i am able to crop the image. Many Thanks.

Simply SDL_RenderCopy() enough textures to flll the screen, tiling in x and/or y directions as appropriate. Scrolling is just a case of adjusting the positions of the destination rectangles according to the time or frame count.

Does Any sample available in forum or if you have it share with me. Give basic example of scroll 2 images one by one without any delay like tiling.

Looking forward your reply.

Thanks

Hi

main.cpp (13.7 KB)

  1. I need to load 3 images but its loading only 2 images.
  2. It should auto scroll without any key event till 3rd image.
  3. Does it possible to start auto scroll from window right position not from left ?

Thanks for advance.

Looking forward your solution.