0

I am just getting into 3D modeling, like really just getting into it.

  JPEGImageEncoder jie = JPEGCodec.createJPEGEncoder(bos);
  JPEGEncodeParam param = jie.getDefaultJPEGEncodeParam(bImage);
  param.setQuality(1.0f, true);
  jie.setJPEGEncodeParam(param);
  jie.encode(bImage);

I need to replace these lines, apparently with java ImageIO. I really don't know much about these, but I would like to get this code to run.

I got the code from here: http://www.java2s.com/Code/Java/3D/HumanAnimation.htm

I was able to find all the packages I needed, but it won't let me use some of the sun packages. From what I've read, I should be using java ImageIO to do these things, but the problem is, I'm not sure what these lines are doing exactly, so I don't know what to replace them with. Any help would be great. Thanks.

Tyler
  • 35
  • 9
  • Do you have the `j3d` libraries downloaded and on your classpath? [From here](https://java3d.java.net/binary-builds.html) – Matt Clark May 04 '17 at 19:35
  • Also, these packages are very old, you might want to find some tutorials that have newer examples using more up to date and comprehensive libraries. – Matt Clark May 04 '17 at 19:36
  • Yea, it's not the j3d libraries that are the problem. It's the sun libraries. – Tyler May 04 '17 at 19:58
  • I have j3d-core-1.3.1.jar , j3d-core-utils-1.3.1.jar , vecmath-1.5.1.jar and then the JavaSE-1.7 environment. Could you maybe provide a link to some newer examples? The examples that seem to be popping up are apparently older. – Tyler May 04 '17 at 20:00
  • Usually, you read an image using BufferedImage img=ImageIO.read(File f); – Luatic May 04 '17 at 20:21
  • @user7185318 Is that what encode does is read? It sounds more like a write operation to me, just by the name. – Tyler May 04 '17 at 21:09

0 Answers0