Re: Work around requested
On 12/20/2011 3:46 PM, bH wrote:
On Dec 19, 12:01 am, bH<bherbs...@hotmail.com> wrote:
On Dec 18, 1:36 am, "John B. Matthews"<nos...@nospam.invalid> wrote:
I have jdk1.7.0, using a Windows7 machine.
I am working on a program
that will reduce a jpeg image to a
Thumbnail sized jpeg image. My program sample
uses these three imports,
among others. They are:
my IDE lists the error as
"package com.sun.image.codec.jepg does
Is there a work around that will do the same thing
but without these import listed above?
TIA for your reply.
We'll assume the misspelling in your post was a typo and that you did
not copy and paste the message.
Good point; exact, quoted error messages are also a good search target.
The existence or non-existence of a package does not depend on your
You have not provided the correct classpath to the compiler for it to
detect the needed package.
I recently installed 1.7.0_02, and I can see them in either NetBeans or
the command line with the classpath option, e.g.:
javap -classpath "\Program Files\Java\jdk1.7.0_02\src.zip" com.sun.image.codec.jpeg.JPEGCodec
The bigger problem is that these classes may not be available in future
releases. You might want to look at removing the dependence. The
classes javax.imageio.ImageIO and java.awt.image.AffineTransformOp may
be all you need.
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>- Hide quoted text -
- Show quoted text -
Thanks for your help and suggestions.
The workaround is now complete.
bH- Hide quoted text -
- Show quoted text -
I compared the output using one large image
1600 x 1200 pixels cropped to 200 x 150 in both
programs, first program uses:
and the second program with the revision as suggested
above by John Matthews:
uses the classes javax.imageio.ImageIO and
The comparison result is that the suggested
revision by John Matthews comes in second place.
It does do crop it, but is less perfect of a
crop than the first method listed.
For instance in the second program,
the image is not as sharp and clear.
My guess would be that AffineTransormOP uses those very same CODECS.
There are several options that can be specified to tune the result. Why
don't you post your code and a sample image.
X-Hamster-Info: Score=0 ScoreLoad=0 ScoreSave=0 Received 111223030705
Xref: localhost comp.lang.java.programmer:32314
From: Roedy Green <email@example.com>
Subject: Re: Custom fonts
Date: Thu, 22 Dec 2011 06:55:29 -0800
Organization: Canadian Mind Products
Reply-To: Roedy Green <firstname.lastname@example.org>
Content-Type: text/plain; charset=us-ascii
X-Notice: Filtered by postfilter v. 0.8.2
X-Newsreader: Forte Agent 6.00/32.1186
X-Old-Xref: news.ett.com.ua comp.lang.java.programmer:82212
On Fri, 16 Dec 2011 09:07:38 -0800, Roedy Green
<email@example.com> wrote, quoted or indirectly quoted
someone who said :
Has anyone used a scheme where you use a proprietary font on your
webpages or in your Applet.
Tiresias is a public domain font for the visually challenged. I have
set up some webpages with it using the @font-face feature. You can see
if I got it right by looking at
I have posted the lyrics to 81 Christmas carols. If all is working,
you should see them in large Tiresias font.
If it does not work, you can still install the font manually.
Unfortunately, I have it in TTF form only and the font is locked so I
can't convert it to other formats.
I have yet to uninstall Tiresias and test with all the browsers to see
which support it. I suspect IE will fail since it want s eot fonts.
Given that fonts are just data, it should be possible to support all
fonts everywhere. I don't know why there are so many formats.
Adobe encrypted PS to start, which forced the creation of TrueType,
but I don't know why the others were created.
Roedy Green Canadian Mind Products
If you can't remember the name of some method,
consider changing it to something you can remember.