png Vs. jpg

Discussion and feedback on Construct 2

Post » Sun Dec 11, 2011 6:03 pm

I think a good question would be is there any difference in how well canvas handles different formats?
You might save some disk space using jpg, but if it's much slower than png you might not want to use it.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Sun Dec 11, 2011 6:15 pm

I asked for this feature a while ago and if I recall correctly, Ashley put it on his to do list.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Sun Dec 11, 2011 7:01 pm

I haven't tested it for the moment, but isn't it possible to let C2 use dummy PNG files when you are working with it, and then, when exporting the final project, you switch the png file with your jpeg files. You can rename your png files and give them the name of the png files. For example, FF is intelligent enough to load and display an image with the wrong extension, because the image lib is reading the magic number at the beginning of the file.
It's quick and dirty, but it should work..
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Sun Dec 11, 2011 9:09 pm

Yeah but don't JPEGs get a lot of ugly ass artifacts in them over time?
B
19
S
3
G
2
Posts: 148
Reputation: 1,945

Post » Sun Dec 11, 2011 10:02 pm

I agree, multiple formats should be used.
B
47
S
10
G
6
Posts: 455
Reputation: 8,326

Post » Sun Dec 11, 2011 10:33 pm

@EmperorIng360

That's only when you edit them. Like if you were to change the image multiple times. Its like what happens when you use a copy machine and use the copy to make another copy.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Sun Dec 11, 2011 11:59 pm

There seems to be a lot of confusion in this thread. All that's being asked for (if I understand) is convert to JPEG on export to reduce the download size for certain images. Of course JPEG is lossy and doesn't support alpha, which is why it is never used in the editor, it just could be an option to further compress JPEG suitable images when exporting.

This has been on my todo list for a while. A workaround in the mean time is to convert images to .jpg yourself after exporting, then you need to update the filenames in two places: first in c2runtime.js and then also in offline.appcache. (find and replace myfile.png with myfile.jpg in both)
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,498

Post » Mon Dec 12, 2011 6:37 am

[QUOTE=Ashley] There seems to be a lot of confusion in this thread. All that's being asked for (if I understand) is convert to JPEG on export to reduce the download size for certain images. Of course JPEG is lossy and doesn't support alpha, which is why it is never used in the editor, it just could be an option to further compress JPEG suitable images when exporting.

This has been on my todo list for a while. A workaround in the mean time is to convert images to .jpg yourself after exporting, then you need to update the filenames in two places: first in c2runtime.js and then also in offline.appcache. (find and replace myfile.png with myfile.jpg in both)[/QUOTE]

If it's on the todo list than I can sleep more calmly :)

All I asked was to keep the source file intact. If the game designer uploaded a jpeg it must have been in purpose. The same goes with Png.
I simply use both formats cause I know what format gives me the best possible outcome. Sometimes I prefer a Jpeg cause I use large bitmaps and I don't mind losing some details and sometimes I enjoy the transparency and don't mind the file size.

Thanks.
B
35
S
12
G
6
Posts: 111
Reputation: 7,087

Post » Mon Dec 12, 2011 2:43 pm

[QUOTE=Ashley] All that's being asked for (if I understand) is convert to JPEG on export to reduce the download size for certain images... ...it just could be an option to further compress JPEG suitable images when exporting.[/QUOTE]
What I think would be really useful, and is what HotGod is probably suggesting, is not just a JPEG compression option on export, but a way to link an manage different file types as textures.

Like HotGod said:

[QUOTE=HotGod] All I asked was to keep the source file intact. If the game designer uploaded a jpeg it must have been in purpose. The same goes with Png.
I simply use both formats cause I know what format gives me the best possible outcome.[/QUOTE]
I share this very same desire.

What comes into my mind is the way 3D softwares manage textures. They normally have a texture slot that you can set to any image you want, using any of the supported formats. They normally also include some options like ignore or invert alpha, use mipmap, interpolation mode, etc. Then the image gets linked to the texture slot.

C2 does almost the same thing, the main difference is that it automatically converts any image you load to PNG. And that is what causes conflict with the designers intentions when using different image formats.Animmaniac2011-12-12 14:44:31
Scirra Employee
B
129
S
45
G
15
Posts: 705
Reputation: 15,413

Post » Sun Jan 15, 2012 6:01 pm

I thought this one was solved. I read a blog about the feature that determines image file type on export. Now tell me where the !@$@#% switch is....   

Ahh, here it is...

www.scirra.com/manual/129/image-formatLoki20202012-01-15 18:16:52
B
22
S
7
G
3
Posts: 41
Reputation: 2,751

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: glerikud and 8 guests