How to scale down imageSheet?

Is it possible at all? I have an imageSheet: 300x2400 with 8 frames (300x300). I would like to show it as 150x150 animated image.

local GR_imagesheetOptions =
{
	width = 300,
	height = 300,
	numFrames = 8,
	--optional parameters; used for scaled content support
	sheetContentWidth = 2400,  -- width of original 1x size of entire sheet
	sheetContentHeight = 300   -- height of original 1x size of entire sheet
}

I can easily double sheetContentWidth & sheetContentHeight which zooms the image in. But values smaller than the original file resolution just do not work.

If no programmatical solution found, I will just edit the file…

Really two ways to go here. You can simply set the xScale & yScale of the final sprite to 0.5 and that will take care of it.

If you are looking for every image in your app to be scaled to 50%–which is goo if you want to take advantage of high DPI screens–double your width and height in your config.lua

Hope that helps!

2 Likes

xScale&yScale worked for me. Thanks.

1 Like