Register for your free account! | Forgot your password?

You last visited: Today at 13:32

  • Please register to post and access all features, it's quick, easy and FREE!


Tiles to one bitmap, screws up x_X

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2011
Posts: 1,537
Received Thanks: 782
Tiles to one bitmap, screws up x_X

So I'm trying to combine tiles into a single bitmap.

This is how I'm doing it:
Code:
 Bitmap bit = new Bitmap(mapWidth, mapHeight);

    using (System.Drawing.Graphics graphics = System.Drawing.Graphics.FromImage(bit))
    {
    for (int y = 0; y < mapHeight; y += 32)
    {
    for (int x = 0; x < mapWidth; x += 32)
    {
    using (Bitmap tile = new Bitmap(location + "\\" + y + "_" + x + ".png"))
    {
    graphics.DrawImage(tile, new Point(x, y));
    tile.Dispose();
    }
    }
    }

    graphics.Dispose();
    }
Bitmap size is 128x128.

File name structure is like this: y_x.png

Each tile looks like this:


The result: (Don't mind the black area.)


What it actually should look like:


What could cause it to screw up like this? X_X

This is really bugging me XD.

#Edit got it fixed, this can be closed.



I don't have a username is offline  
Old 08/22/2012, 20:29   #2
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,877
The purpose of using a using statement is to invoke Dispose automatically btw....


InfamousNoone is offline  
Thanks
1 User
Old 08/23/2012, 06:52   #3
 
elite*gold: 0
Join Date: Sep 2007
Posts: 573
Received Thanks: 102
Quote:
Originally Posted by InfamousNoone View Post
The purpose of using a using statement is to invoke Dispose automatically btw....
Is that the only purpose it servers?
StarBucks is offline  
Old 08/23/2012, 09:04   #4
 
elite*gold: 0
Join Date: Dec 2011
Posts: 1,537
Received Thanks: 782
Quote:
Originally Posted by InfamousNoone View Post
The purpose of using a using statement is to invoke Dispose automatically btw....
Yeah I know, but it's just a bad habit xD

Quote:
Originally Posted by StarBucks View Post
Is that the only purpose it servers?
Unless you're using it to define namespaces.

http://msdn.microsoft.com/en-us/libr...=vs.80%29.aspx
I don't have a username is offline  
Reply



« [Question]Proxy Network | aim assist tool »

Similar Threads
tiles.raw bearbeiten..
06/02/2012 - Metin2 PServer - Discussions / Questions - 0 Replies
Hey Leute, Ich wollte grade die tiles.raw bearbeiten. Jedoch kriege ich damit nur misst hin. Ich arbeite mit Photoshop. Edit: STRG + L Zum abdunkeln / Aufhellen :D
Skill Tiles?
05/18/2010 - CO2 Main - Discussions / Questions - 5 Replies
I was wondering, are skill tiles possible to edit in Conquer. I mean like how the thunder tile is a little thunderbolt, then the one for fire is a red thunderbolt. Can these be edited to be different icons?
DARKX HACK SCREWS COMP UP!
01/29/2008 - GunZ - 0 Replies
at first i thought the hack was awesome, then after ehh, 30 mins of using it, the game just says "Disconnected" and then you have to turn ur computer off to do anything. at 1st i didnt know, just thought there was an error on my comp and i went 2...
TQ Screws me over its time for revenge!
08/03/2006 - CO2 Main - Discussions / Questions - 11 Replies
I am Nazra, I have vowed and promised myself to be a true hearted player after the last big patch when i lost my bots... I saw no fun in botting... I saw only guilt in myself... Guilt of thinking I AM one of those cheaters I WAS... But now Ill never...



All times are GMT +2. The time now is 13:32.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.