summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authoreea1 <eea1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-12-19 21:43:07 +0000
committereea1 <eea1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-12-19 21:43:07 +0000
commit47c1fb145616fc1dc185311ded6d06b1428cfe7d (patch)
tree934a6ea31f7edbc1a7b7fd0ccf6973474f070348 /java
parent1f60de87722648750077b7472fec8ff903f9eb9e (diff)
downloadATCD-47c1fb145616fc1dc185311ded6d06b1428cfe7d.tar.gz
Added a flush at the end of the send of a GIF.
Fixed the configuration file (filter.conf usually) loading code.
Diffstat (limited to 'java')
-rw-r--r--java/ImageProcessing/framework/GIFHandler.java6
-rw-r--r--java/ImageProcessing/framework/ImageApp.java11
2 files changed, 15 insertions, 2 deletions
diff --git a/java/ImageProcessing/framework/GIFHandler.java b/java/ImageProcessing/framework/GIFHandler.java
index 336ed25141a..3d099ba294c 100644
--- a/java/ImageProcessing/framework/GIFHandler.java
+++ b/java/ImageProcessing/framework/GIFHandler.java
@@ -42,14 +42,20 @@ public class GIFHandler extends BlobWriter
// Send the data
protected int sendData ()
{
+
+
try
{
if (this.length_ > 0)
{
OutputStream ostream = this.peer ().outputStream ();
+
this.encoder_ = new GifEncoder (this.image_, ostream);
+
this.encoder_.encode ();
+ ostream.flush();
+
// this.encoder_ = new GIFEncoder (this.image_);
// this.encoder_.Write (ostream);
}
diff --git a/java/ImageProcessing/framework/ImageApp.java b/java/ImageProcessing/framework/ImageApp.java
index c75beea6a4f..486f45b9afb 100644
--- a/java/ImageProcessing/framework/ImageApp.java
+++ b/java/ImageProcessing/framework/ImageApp.java
@@ -122,7 +122,9 @@ public class ImageApp extends Applet
Image image = null;
try
{
+ System.out.println("Getting image");
image = getImage (new URL (url));
+ System.out.println("Done");
}
catch (MalformedURLException e)
{
@@ -181,10 +183,15 @@ public class ImageApp extends Applet
this.configFile_ = "http://www.cs.wustl.edu/~pjain/java/ACE_wrappers/java/ImageProcessing/framework/filter.conf";
*/
+ if (this.configFile_ == null)
+ this.configFile_ = this.getCodeBase().toString() + "../ImageProcessing/framework/filter.conf";
+
String configInfo = null;
- // Only get the file as a URL if it was specified as a parameter!
- if ((this.configFile_ == null) || (!this.configFile_.startsWith("http://"))) {
+ // Only get the file as a URL if it was specified as an http style parameter!
+ if ((this.configFile_ != null) && ((this.configFile_.startsWith("http://")) ||
+ (this.configFile_.startsWith("file://")) ||
+ (this.configFile_.startsWith("ftp://")))) {
URL url;