# .jpg Thumbnail-on-fly Generation Lag Problems

**URL:** https://forum.kirupa.com/t/jpg-thumbnail-on-fly-generation-lag-problems/236080
**Category:** flash
**Created:** [August 17, 2007, 12:30am UTC](https://forum.kirupa.com/t/jpg-thumbnail-on-fly-generation-lag-problems/236080 "2007-08-17T00:30:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![v3rt](https://avatars.discourse-cdn.com/v4/letter/v/6f9a4e/32.png) [@v3rt](https://forum.kirupa.com/u/v3rt)
#### Post date: [August 17, 2007, 12:30am UTC](https://forum.kirupa.com/t/jpg-thumbnail-on-fly-generation-lag-problems/236080/1 "2007-08-17T00:30:52Z")

</div>

I’m making a picture gallery program and making it so that it takes images and resizes them to fit the proper thumbnail size, using onInit from the clip loader object and \_xcale/\_yscale. The problem is, the first time the thumbnail scrolls into the visible area, massive lag results; the app freezes for a solid half second until the thumbnail bar resumes scrolling. This does not happen with smaller pictures: apparently, Flash is being stupid and is reducing the size, but not the resolution, of the images. Is there a way to solve this problem other than  
a) loading each thumbnail on the visible stage at first, then immediately repositioning into the bar (this would multiply load time substantially) or  
b) a server-side jpg resizer?
