|
From: <axl...@us...> - 2009-08-01 02:45:31
|
Revision: 446
http://hgengine.svn.sourceforge.net/hgengine/?rev=446&view=rev
Author: axlecrusher
Date: 2009-08-01 02:45:23 +0000 (Sat, 01 Aug 2009)
Log Message:
-----------
string to color byte type
Modified Paths:
--------------
Mercury2/src/RawImageData.cpp
Mercury2/src/RawImageData.h
Modified: Mercury2/src/RawImageData.cpp
===================================================================
--- Mercury2/src/RawImageData.cpp 2009-08-01 02:44:35 UTC (rev 445)
+++ Mercury2/src/RawImageData.cpp 2009-08-01 02:45:23 UTC (rev 446)
@@ -11,6 +11,20 @@
SAFE_DELETE_ARRAY(m_data);
}
+ColorByteType ToColorByteType(const MString& s)
+{
+ if (s == "RGB")
+ return RGB;
+ else if (s == "RGBA")
+ return RGBA;
+ else if (s == "RGB16")
+ return RGB16;
+ else if (s == "RGBA16")
+ return RGBA16;
+
+ return RGB;
+}
+
/****************************************************************************
* Copyright (C) 2008 by Joshua Allen *
* *
Modified: Mercury2/src/RawImageData.h
===================================================================
--- Mercury2/src/RawImageData.h 2009-08-01 02:44:35 UTC (rev 445)
+++ Mercury2/src/RawImageData.h 2009-08-01 02:45:23 UTC (rev 446)
@@ -1,6 +1,8 @@
#ifndef RAWIMAGEDATA_H
#define RAWIMAGEDATA_H
+#include <MercuryUtil.h>
+
enum ColorByteType
{
WHITE,
@@ -11,6 +13,8 @@
RGBA16,
};
+ColorByteType ToColorByteType(const MString& s);
+
class RawImageData
{
public:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|