Trim function stopped working?

Does the trim function still work for you? When I use trim it scales the image to fill the removed space.
It used to work, but it seems that the last few updates broke some things in Corona?

Also animations made with trim on are very jittery.

Hi @Juf Jannie,

Are you referring to the last few updates of Corona, or the last few updates of TexturePacker? Are you sure you’re using the correct trim mode? There are two trim modes if I recall (perhaps 3). I don’t think there is anything that changed in the latest few versions of Corona which would affect this.

Take care,

Brent

Latest version of texture packer.
I reinstalled an older version I had, and found some settings, that should help with the jittering.

But I think the scale problem has to do with a combination of things.

I am using spine that creates animations, but the spine engine is being driven by spine helper someone on these forums wrote.
 

So somewhere along the line it goes wrong. But, I solved by reexporting the files from photoshop so they didn’t need trimming. Bit f a work around. But too many steps from different people where there can be a problem. So I chose a workaround.

There is just one trimmed the other two are clipping modes or something,they don’t store the original size of the image.

Hi @Juf Jannie,

Are you referring to the last few updates of Corona, or the last few updates of TexturePacker? Are you sure you’re using the correct trim mode? There are two trim modes if I recall (perhaps 3). I don’t think there is anything that changed in the latest few versions of Corona which would affect this.

Take care,

Brent

Latest version of texture packer.
I reinstalled an older version I had, and found some settings, that should help with the jittering.

But I think the scale problem has to do with a combination of things.

I am using spine that creates animations, but the spine engine is being driven by spine helper someone on these forums wrote.
 

So somewhere along the line it goes wrong. But, I solved by reexporting the files from photoshop so they didn’t need trimming. Bit f a work around. But too many steps from different people where there can be a problem. So I chose a workaround.

There is just one trimmed the other two are clipping modes or something,they don’t store the original size of the image.

Hi Juf Jannie,

I found the same issue in my last project. And I am fighting against it in my current project. 

My solution is to use “display.newImage” instead of “display.newImageRect” ( I don’t know why, but newImage scales properly images from imageSheet and newImageRect doesn’t ).

After you can scale images with .xScale and .yScale properties.

Would be nice that corona team solves it.

Have a nice day, thanks for your contributions Juf and Brend (I learned from them in the past)

Adrian

Just adding my voice - i have also been struggling with some issue using display.newImageRect() It looks great in the simulator, but fails on device…  Going to try your approach aramirez64

Still no joy. Nothing I do seems to allow image to come up on the device (and the app stops at that point). Stuff before it loads, but nothing at that point… It all works great on the simulator. Are there any tools that allow you to see errors on the device?

Hi @sonyayllc,

What overall size (pixel dimensions) is your image sheet? What device are you testing on?

Best regards,

Brent

It is just a single image, about 260w x 190h. There is some code to switch the image based on button selection, but they are separate images.

I am using a Galaxy S5, and now that you mention it, I am not sure why I didn’t try another device.

Are you obeying case-sensitive rules? Devices are adamant about that, while the Simulator is not. Please check that you have typed the image name in your code to exactly match the case-sensitive name of the image file.

Brent

That was it, thanks Brent! A new tool was putting the file extension in all CAPS.

Thanks again!

Hi Juf Jannie,

I found the same issue in my last project. And I am fighting against it in my current project. 

My solution is to use “display.newImage” instead of “display.newImageRect” ( I don’t know why, but newImage scales properly images from imageSheet and newImageRect doesn’t ).

After you can scale images with .xScale and .yScale properties.

Would be nice that corona team solves it.

Have a nice day, thanks for your contributions Juf and Brend (I learned from them in the past)

Adrian

Just adding my voice - i have also been struggling with some issue using display.newImageRect() It looks great in the simulator, but fails on device…  Going to try your approach aramirez64

Still no joy. Nothing I do seems to allow image to come up on the device (and the app stops at that point). Stuff before it loads, but nothing at that point… It all works great on the simulator. Are there any tools that allow you to see errors on the device?

Hi @sonyayllc,

What overall size (pixel dimensions) is your image sheet? What device are you testing on?

Best regards,

Brent

It is just a single image, about 260w x 190h. There is some code to switch the image based on button selection, but they are separate images.

I am using a Galaxy S5, and now that you mention it, I am not sure why I didn’t try another device.

Are you obeying case-sensitive rules? Devices are adamant about that, while the Simulator is not. Please check that you have typed the image name in your code to exactly match the case-sensitive name of the image file.

Brent

That was it, thanks Brent! A new tool was putting the file extension in all CAPS.

Thanks again!