mapeditor/tiled

Do you want to work on this issue?

You can request for a bounty in order to promote it!

exporting images as png make them becomes corrupted #3674

Charizardtheking posted onGitHub

Hi I am wondering if I could get some help as every time I try to export as an image png the image becomes corrupted here is the file as an example it may look normal on here on my PC but it says that its format is unsupported or corrupted dfhjhsh


Hmm, this image is incredibly big (64 x 567968 pixels), but it does open correctly for me in Tiled (on Linux, against Qt 6.4.3), with the following content at the top:

image

Followed by some more tiles and then a huge amount of blank space.

Since you say this image is from "Export As Image", could it be that you somehow have a layer with a huge offset in your map? This might explain the large transparent part of the image. Or is it an infinite map, where you accidentally placed some tiles very far away while being zoomed out?

I seems apart from the image height being so large, it is not actually corrupted.

posted by bjorn about 2 years ago

Hmm, this image is incredibly big (64 x 567968 pixels), but it does open correctly for me in Tiled (on Linux, against Qt 6.4.3), with the following content at the top:

image

Followed by some more tiles and then a huge amount of blank space.

Since you say this image is from "Export As Image", could it be that you somehow have a layer with a huge offset in your map? This might explain the large transparent part of the image. Or is it an infinite map, where you accidentally placed some tiles very far away while being zoomed out?

I seems apart from the image height being so large, it is not actually corrupted.

The large transparent part is supposed to be like that as this tileset isn’t finished yet it’s not set on infinite map nor did I accidentally place anything outside the image I’m trying to export as png to use rpg maker xp but that’s where the whole corrupted thing happens or saying that the file type isn’t supported

posted by Charizardtheking about 2 years ago

The large transparent part is supposed to be like that as this tileset isn’t finished yet

Ok, I thought this image was the result of "Export As Image". When it is your tileset image, I think you went a little bit overboard with the empty area. Also, note that there is no reason at all to allocate a large transparent area at the bottom of your tileset, since you can always resize the image later as needed. Only changing the width of the tileset image is a potential issue, but changing the height does not invalidate any tile references.

And in that case, could you also attach the map you're using (and if applicable, the tileset you've set up)? I've set up a tileset with your huge tileset image, made a map and exported as image, but in my case that worked fine.

posted by bjorn about 2 years ago

The large transparent part is supposed to be like that as this tileset isn’t finished yet

Ok, I thought this image was the result of "Export As Image". When it is your tileset image, I think you went a little bit overboard with the empty area. Also, note that there is no reason at all to allocate a large transparent area at the bottom of your tileset, since you can always resize the image later as needed. Only changing the width of the tileset image is a potential issue, but changing the height does not invalidate any tile references.

And in that case, could you also attach the map you're using (and if applicable, the tileset you've set up)? I've set up a tileset with your huge tileset image, made a map and exported as image, but in my case that worked fine.

Yeah the size is a lot as it’s still a work in process I just wanted to test it out and see if everything works on the program that I’m using it’s probably best to finish the image and then worrying about exporting it later but I can try to attach the map let’s see if it’s just an issue with my system untitled.csv

posted by Charizardtheking about 2 years ago

Please don't attach the map as csv file since that's not a format that can be loaded, as it is only an export format. Preferably use the tmx or json formats.

posted by bjorn about 2 years ago

Please don't attach the map as csv file since that's not a format that can be loaded, as it is only an export format. Preferably use the tmx or json formats.

oh my bad sorry about that git hub does not seem to support those two so I cant drag it here

posted by Charizardtheking about 2 years ago

@Charizardtheking I think GitHub supports uploading zip files, so best is to just archive all the files and upload them as such.

posted by bjorn about 2 years ago

okay here is the file ff.zip

posted by Charizardtheking about 2 years ago

@Charizardtheking Could you include all the files needed to reproduce the problem? Your map contains references to a dozen tilesets. Are these needed to reproduce the problem? If so, please include them in the zip file, both the .tsx files as well as their source images. But ideally, you could create a minimal map + tileset that produces a corrupted image for you when you try to export it as image.

To me it seems that the exported image, if it is the image you shared in your first message here, it simply very large and not corrupted. Could it be that the software you're trying to view or open that image in, just isn't able to render such large images?

posted by bjorn about 2 years ago

@bjorn I think it is it be large could be the reason is there a size limit. ? well anyways here's the updated file with everything ff.zip

posted by Charizardtheking about 2 years ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests