Mercurial > projects > dwt-win
diff dwt/internal/image/GIFFileFormat.d @ 212:ab60f3309436
reverted the char[] to String and use the an alias.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 05 May 2008 00:12:38 +0200 |
parents | 41dbc4d9faab |
children | 36f5cb12e1a2 |
line wrap: on
line diff
--- a/dwt/internal/image/GIFFileFormat.d Sat Apr 26 10:01:48 2008 +0200 +++ b/dwt/internal/image/GIFFileFormat.d Mon May 05 00:12:38 2008 +0200 @@ -23,9 +23,10 @@ import dwt.graphics.ImageLoader; import tango.core.Exception; import dwt.dwthelper.System; +import dwt.dwthelper.utils; final class GIFFileFormat : FileFormat { - char[] signature; + String signature; int screenWidth, screenHeight, backgroundPixel, bitsPerPixel, defaultDepth; int disposalMethod = 0; int delayTime = 0; @@ -61,7 +62,7 @@ byte[3] signature; stream.read(signature); stream.unread(signature); - return cast(char[])signature == "GIF"; //$NON-NLS-1$ + return cast(String)signature == "GIF"; //$NON-NLS-1$ } catch (Exception e) { return false; } @@ -77,7 +78,7 @@ byte[7] block; try { inputStream.read(signatureBytes); - signature = cast(char[])signatureBytes.dup; + signature = cast(String)signatureBytes.dup; if (signature != "GIF") //$NON-NLS-1$ DWT.error(DWT.ERROR_INVALID_IMAGE); @@ -314,11 +315,11 @@ // Read application identifier. byte[] applicationBytes = new byte[8]; inputStream.read(applicationBytes); - char[] application = cast(char[])(applicationBytes.dup); + String application = cast(String)(applicationBytes.dup); // Read authentication code. byte[] authenticationBytes = new byte[3]; inputStream.read(authenticationBytes); - char[] authentication = cast(char[])(authenticationBytes.dup); + String authentication = cast(String)(authenticationBytes.dup); // Read application data. byte[] data = new byte[0]; byte[] block = new byte[255];