diff --git a/.gitignore b/.gitignore
index 60fa229..8134462 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,7 @@
*.exe
+*.dll
+*.zip
+*.png
+*.tim
+*.bmp
obj
\ No newline at end of file
diff --git a/README.md b/README.md
index f71d689..6e04fca 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,17 @@
-# img2tim
+# IMG2TIM
An Image to PlayStation TIM File Converter
This tool converts almost any image file into a PlayStation TIM image file for PlayStation homebrew development. Uses the FreeImage library for loading image files of almost any file format.
-# Features
-- Uses the same argument format used in bmp2tim.
-- Supports alpha channel (if available) with threshold control as transparency mask.
-- Color-key and index-key transparency masking.
-- RGB to color-index image conversion (currently very basic).
+## Features
+* Uses the same arguments used in bmp2tim with special additional arguments.
+* Supports alpha channel (if available) with threshold control as transparency mask.
+* Color-key and index-key transparency masking.
+* Basic RGB to color-index image conversion.
+
+## Changelog
+**Version 0.75**
+* Fixed a pixel order bug when converting images from either RGB or 4-bit depth to 4-bit color depth.
+
+**Version 0.60**
+* Initial release.
\ No newline at end of file
diff --git a/img2tim.cbp b/img2tim.cbp
index 2112089..8a03427 100644
--- a/img2tim.cbp
+++ b/img2tim.cbp
@@ -11,6 +11,7 @@
+
diff --git a/img2tim.depend b/img2tim.depend
index 2919a3e..a06bb54 100644
--- a/img2tim.depend
+++ b/img2tim.depend
@@ -1,12 +1,12 @@
# depslib dependency file v1.0
-1458085464 source:c:\documents and settings\lameguy64\desktop\projects\img2tim\main.cpp
+1476085104 source:c:\documents and settings\lameguy64\desktop\projects\img2tim\main.cpp
- "freeimage/freeimage.h"
+
"tim.h"
1395229970 c:\documents and settings\lameguy64\desktop\projects\img2tim\freeimage\freeimage.h
@@ -17,7 +17,7 @@
1430448034 c:\documents and settings\lameguy64\desktop\projects\img2tim\tim.cpp
-1459050299 source:c:\users\lameguy64\desktop\projects\img2tim\main.cpp
+1476152828 source:c:\users\lameguy64\desktop\projects\img2tim\main.cpp
@@ -33,18 +33,18 @@
1446696616 c:\users\lameguy64\desktop\projects\img2tim\tim.cpp
-1446768380 c:\users\lameguy64\desktop\projects\img2tim\tim.h
+1458995574 c:\users\lameguy64\desktop\projects\img2tim\tim.h
-1446768874 source:c:\users\lameguy64\desktop\projects\img2tim\tim.cpp
+1458995574 source:c:\users\lameguy64\desktop\projects\img2tim\tim.cpp
"tim.h"
-1446768876 source:c:\documents and settings\lameguy64\desktop\projects\img2tim\tim.cpp
+1459049574 source:c:\documents and settings\lameguy64\desktop\projects\img2tim\tim.cpp
"tim.h"
-1446768382 c:\documents and settings\lameguy64\desktop\projects\img2tim\tim.h
+1459049574 c:\documents and settings\lameguy64\desktop\projects\img2tim\tim.h
diff --git a/img2tim.layout b/img2tim.layout
index 181fa5f..3f2985d 100644
--- a/img2tim.layout
+++ b/img2tim.layout
@@ -6,14 +6,14 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/main.cpp b/main.cpp
index 784945f..108448b 100644
--- a/main.cpp
+++ b/main.cpp
@@ -8,7 +8,7 @@
#include "tim.h"
-#define VERSION "0.60"
+#define VERSION "0.75"
namespace param {
@@ -384,9 +384,9 @@ void ConvertImageToTim(IMGPARAM image, tim::PARAM* tim) {
}
- tim->format = 2;
+ tim->format = 2;
tim->imgWidth = image.w;
- tim->imgHeight = image.h;
+ tim->imgHeight = image.h;
}
@@ -518,7 +518,12 @@ void ConvertImageToTim(IMGPARAM image, tim::PARAM* tim) {
for(short py=0; pyimgData)[(image.w/2)*py], &((u_char*)image.pixels)[(image.w/2)*py], image.w/2);
+ for(short px=0; pximgData)[px+((image.w/2)*py)] = ((pix&0xf)<<4)|((pix>>4)&0xf);
+
+ }
}