png resize?

Discussion and feedback on Construct 2

Post » Fri Mar 09, 2012 11:41 am

I'm making an application with around 10mb of images (originally 30mb) that I painstakingly compressed in photoshop to around 30kb of size each.

Now I noticed that when I import them in c2 they go back to being around 100kb each. Why?
B
29
S
9
G
6
Posts: 525
Reputation: 8,294

Post » Fri Mar 09, 2012 12:02 pm

Probably because of the image compression with C2.

Set your images in the image editor to be 8bits pngs, this should allow you to decrease the weight of images on export.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Fri Mar 09, 2012 4:34 pm

Is there anyway to avoid the resizing? And directly use my compressed images?
B
29
S
9
G
6
Posts: 525
Reputation: 8,294

Post » Fri Mar 09, 2012 6:00 pm

I think you can replace them after exporting the project. Just drop the files in the images folder with the same names as the original images and it must work.
Scirra Employee
B
129
S
45
G
15
Posts: 705
Reputation: 15,413

Post » Fri Mar 09, 2012 7:27 pm

When you import images of any format Construct 2 re-saves it as a PNG using a default stock encoder which doesn't do many optimisations, because it's not as important for your project to be small, only the final exported project needs to be as small as possible. Also if you change an image at all in the editor (e.g. flip or mirror or any tools when we add them) then it can't re-use the original image anyway, so it would be very brittle to try and make Construct 2 always use the exact imported file.

Instead everything's run through image recompression on export to squeeze files down to the minimum size. I would be surprised if, on export, you could beat the compression done by Construct 2 - we've paid to license some specialist tools for the process, and it will do things like count the colors and switch to PNG-8 for 256 color images, and then try multiple PNG compression strategies and pick the best one.

However, if you can beat it, you can safely paste over the exported image files.Ashley2012-03-09 19:27:45
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Fri Mar 09, 2012 11:55 pm

@Ashley.
Thanks, after exporting the size decreases a lot I'm cool with that.
B
29
S
9
G
6
Posts: 525
Reputation: 8,294


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 3 guests