Jump to content
  • 0
Sign in to follow this  
newboy

Sprite Editor Help

Question

When I click Pack to Cache on Steve's sprite editor, I get this error.

[code]
Running Sprite Editor
java.io.IOException: Corrupt GZIP trailer
at java.util.zip.GZIPInputStream.readTrailer(Unknown Source)
at java.util.zip.GZIPInputStream.read(Unknown Source)
at net.openrs.cache.util.CompressionUtils.gunzip(CompressionUtils.java:6
7)
at net.openrs.cache.Container.decode(Container.java:71)
at net.openrs.cache.Cache.write(Cache.java:169)
at steve.SpriteEditorFrame.jButton1ActionPerformed(SpriteEditorFrame.jav
a:561)
at steve.SpriteEditorFrame$10.actionPerformed(SpriteEditorFrame.java:271
)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour
ce)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown
Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown
Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown
Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
[/code]

Can anyone tell me how to fix it? And does anyone know the sprite for Mod/Admin crowns?

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
at net.openrs.cache.util.CompressionUtils.gunzip(CompressionUtils.java:6
7)[B]------------------------------------>line 67[/B]
at net.openrs.cache.Container.decode(Container.java:71)[B]--------> 71[/B]
at net.openrs.cache.Cache.write(Cache.java:169)[B]------------->169[/B]
at steve.SpriteEditorFrame.jButton1ActionPerformed(SpriteEditorFrame.jav
a:561)-[B]-----> 561[/B]
at steve.SpriteEditorFrame$10.actionPerformed(SpriteEditorFrame.java:271
)-[B]----------------------------->271[/B]



look on the lines and files it tells you and see if you notice anything wrong with it

Share this post


Link to post
Share on other sites
  • 0
[code]
/* uncompress it */
byte[] uncompressed;
if (type == COMPRESSION_BZIP2) {
uncompressed = CompressionUtils.bunzip2(compressed);
} else if (type == COMPRESSION_GZIP) {
uncompressed = CompressionUtils.gunzip(compressed);
} else {
throw new IOException("Invalid compression type");
}
[/code]

[code]
public static byte[] gunzip(byte[] bytes) throws IOException {
/* create the streams */
InputStream is = new GZIPInputStream(new ByteArrayInputStream(bytes));
try {
ByteArrayOutputStream os = new ByteArrayOutputStream();
try {
/* copy data between the streams */
byte[] buf = new byte[4096];
int len = 0;
while ((len = is.read(buf, 0, buf.length)) != -1) {
os.write(buf, 0, len);
}
} finally {
os.close();
}
[/code]

[code]
jButton1.setText("Pack to cache");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
[/code]

Could it be that my image is too big? If so, how do i know what size to make it?

Share this post


Link to post
Share on other sites
  • 0
im not sure i would just go with what ever standard img size is for bg

Share this post


Link to post
Share on other sites
Sign in to follow this  

×