Mercurial > projects > dwt-mac
comparison dwt/internal/image/FileFormat.d @ 45:d8635bb48c7c
Merge with SWT 3.5
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Mon, 01 Dec 2008 17:07:00 +0100 |
parents | 5123b17c98ef |
children |
comparison
equal
deleted
inserted
replaced
44:ca5e494f2bbf | 45:d8635bb48c7c |
---|---|
1 /******************************************************************************* | 1 /******************************************************************************* |
2 * Copyright (c) 2000, 2006 IBM Corporation and others. | 2 * Copyright (c) 2000, 2006 IBM Corporation and others. |
3 * All rights reserved. This program and the accompanying materials | 3 * All rights reserved. This program and the accompanying materials |
4 * are made available under the terms of the Eclipse Public License v1.0 | 4 * are made available under the terms of the Eclipse Public License v1.0 |
5 * which accompanies this distribution, and is available at | 5 * which accompanies this distribution, and is available at |
6 * http://www.eclipse.org/legal/epl-v10.html | 6 * http://www.eclipse.org/legal/epl-v10.html |
80 * return the device independent image array represented by the stream. | 80 * return the device independent image array represented by the stream. |
81 */ | 81 */ |
82 public static ImageData[] load(InputStream istr, ImageLoader loader) { | 82 public static ImageData[] load(InputStream istr, ImageLoader loader) { |
83 FileFormat fileFormat = null; | 83 FileFormat fileFormat = null; |
84 LEDataInputStream stream = new LEDataInputStream(istr); | 84 LEDataInputStream stream = new LEDataInputStream(istr); |
85 bool isSupported = false; | 85 bool isSupported = false; |
86 foreach( TFormat; TFormats ){ | 86 foreach( TFormat; TFormats ){ |
87 try{ | 87 try{ |
88 fileFormat = new TFormat(); | 88 fileFormat = new TFormat(); |
89 if (fileFormat.isFileFormat(stream)) { | 89 if (fileFormat.isFileFormat(stream)) { |
90 isSupported = true; | 90 isSupported = true; |