OpenTibia BitmapToMap v2.0

DarkstaR

Banned User
Joined
Feb 18, 2009
Messages
363
Best answers
0
Reaction score
1
First of all, moderators, I would ask that you close the old thread. It wasn't made by me, but its my program, and I want the rep for my program, from now on. http://otland.net/f19/bitmaptomap-40492/


Many of you have heard of my old program - BitmapToMap. It simply took an image and generated a .OTX map from a predefined list of colors.

Now, that functionality has been extended. It can now write the maps to .OTBM files, and it gives you a wider range of options. The best part is that its now open-source. The tool is written in VB.net and can be compiled with Visual Studio 9 or 10, including express editions. I have heavily commented the code so it will be easily understood by seasoned coders and newcomers alike, in order to ensure that this tool does its job not only functionally, but educationally.

In the past, BitmapToMap allowed you to define an array of colors and place item ID's on them. It now also allows you to selectively ignore certain colors.

Below, you can see the program as it begins to colorize an Oblivion map image.


Next, I will give you an example of BitmapToMap's before and after.

Before:
A simple picture of the US map


After:
A fully playable map of the wonderful 50 states



Link to source code: bitmaptomap - Project Hosting on Google Code
Direct Download: http://tools.tibiaug.com/downloads/BitMapToMap.exe
 

Znote

<?php echo $title; ?>
Staff member
Global Moderator
Premium User
Joined
Feb 14, 2008
Messages
6,617
Best answers
191
Reaction score
1,337
Location
Norway, Oslo
Approved.

/I don't wanna get boomed. :C
 

tosse12

Panchira Project Member
Joined
Jun 10, 2007
Messages
864
Best answers
0
Reaction score
8
Location
Sweden
o_O I am at somehow confused...
Do you mean that any picture I use, will get the same shape but in otx? o_O
if so, I am going to D-load right now! :D and rep++ ofc :D
 
OP
DarkstaR

DarkstaR

Banned User
Joined
Feb 18, 2009
Messages
363
Best answers
0
Reaction score
1

IMac

entrepreneur
Joined
May 31, 2009
Messages
2,482
Best answers
0
Reaction score
16
Location
Pluto
nice maybe u can make it later be able to do borders^_^
 

Syntax

Developer
Joined
Oct 10, 2007
Messages
2,835
Best answers
0
Reaction score
193
Location
Texas
@up, open in RME and hit borderize map... :D
 

Syntax

Developer
Joined
Oct 10, 2007
Messages
2,835
Best answers
0
Reaction score
193
Location
Texas
yup works all da time. It's just not very practical, this is probably the best situation to use it in.
 

Shinmaru

エロルアー Scripter!
Joined
Aug 20, 2007
Messages
1,988
Best answers
0
Reaction score
87
Location
Puerto Rico
Nice!!! I like this, anyway to make it in 'tux'??
Anyways Rep and Kudos for this!
 
OP
DarkstaR

DarkstaR

Banned User
Joined
Feb 18, 2009
Messages
363
Best answers
0
Reaction score
1
Get .NET framework 3.5
 

Mithaz

Nightimp Mapper/Scripter
Joined
Nov 7, 2007
Messages
120
Best answers
0
Reaction score
1
Location
Sweden
This aint working for me :S
Dont know whats wrong and i have .NET framework 3.5 so it cant be it.
 

Mithaz

Nightimp Mapper/Scripter
Joined
Nov 7, 2007
Messages
120
Best answers
0
Reaction score
1
Location
Sweden
Sorry duble post cant edit post.

Maybe this info can help somehow.


HTML:
Information om att aktivera JIT-felsökning i stället för den 
här dialogrutan finns i slutet av det här meddelandet.

************** Undantagstext **************
System.OverflowException: Den aritmetiska operationen orsakade spill.
   vid BitMapToMap.ColorUtils.ColorBetween(Color check, BitmapTileTransformDefinition td)
   vid BitMapToMap.Main.Export_Click(Object sender, EventArgs e)
   vid System.Windows.Forms.Control.OnClick(EventArgs e)
   vid System.Windows.Forms.Button.OnClick(EventArgs e)
   vid System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   vid System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   vid System.Windows.Forms.Control.WndProc(Message& m)
   vid System.Windows.Forms.ButtonBase.WndProc(Message& m)
   vid System.Windows.Forms.Button.WndProc(Message& m)
   vid System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   vid System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   vid System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Inlästa sammansättningar **************
mscorlib
    Sammansättningsversion: 2.0.0.0
    Win32-version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
BitMapToMap
    Sammansättningsversion: 1.0.0.0
    Win32-version: 1.0.0.0
    CodeBase: file:///D:/Niclas%20Game/WoW%20Server%20Work/Server%20Downloads/BitMapToMap.exe
----------------------------------------
Microsoft.VisualBasic
    Sammansättningsversion: 8.0.0.0
    Win32-version: 8.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Sammansättningsversion: 2.0.0.0
    Win32-version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Sammansättningsversion: 2.0.0.0
    Win32-version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Sammansättningsversion: 2.0.0.0
    Win32-version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Sammansättningsversion: 2.0.0.0
    Win32-version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Sammansättningsversion: 2.0.0.0
    Win32-version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Remoting
    Sammansättningsversion: 2.0.0.0
    Win32-version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Core
    Sammansättningsversion: 3.5.0.0
    Win32-version: 3.5.30729.4926 built by: NetFXw7
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
mscorlib.resources
    Sammansättningsversion: 2.0.0.0
    Win32-version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
System.Windows.Forms.resources
    Sammansättningsversion: 2.0.0.0
    Win32-version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_sv_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------

************** JIT-felsökning **************
För att aktivera JIT-felsökning (just-in-time ) måste .config-filen för
det här tillämpningsprogrammet eller datorn (machine.config) ha 
jitDebugging-värdet angivet i avsnittet system.windows.forms.
Tillämpningsprogrammet måste också vara kompilerat
med felsökning aktiverat.

Till exempel:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

När JIT-felsökning är aktiverad kommer alla undantag som inte
hanteras att skickas till JIT-felsökaren som är registrerad på
datorn snarare än att hanteras av den här dialogrutan.
 
OP
DarkstaR

DarkstaR

Banned User
Joined
Feb 18, 2009
Messages
363
Best answers
0
Reaction score
1
When does this occur?
 

cirtaboy

Offensive if u r jew 卍
Joined
Jul 31, 2008
Messages
1,946
Best answers
0
Reaction score
19
Location
Sweden
I get the exact same error, running Windows 7. I have 3.5, and 4.0
I get the error when creating the map.
 
OP
DarkstaR

DarkstaR

Banned User
Joined
Feb 18, 2009
Messages
363
Best answers
0
Reaction score
1
Can someone please translate it to english? :p

Once I know whats wrong I can fix it when I'm home.
 
Top