This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
hi can anybody please tell me how to generate a bitmap file from text entered in Jtextfield
.i need a wirless bitmap format.
Actually i am using this code
private Bitmap getScaledBitmapImage(String imagename, int ratioX, int ratioY)
{
EncodedImage image = EncodedImage.getEncodedImageResource(imagename);
int currentWidthFixed32 = Fixed32.toFP(image.getWidth());
int currentHeightFixed32 = Fixed32.toFP(image.getHeight());
double ratio = (double)ratioX / (double) ratioY;
double w = (double) image.getWidth() * ratio;
double h = (double)image.getHeight() * ratio;
int width = (int) w;
int height = (int) h;
int requiredWidthFixed32 = Fixed32.toFP(width);
int requiredHeightFixed32 = Fixed32.toFP(height);
int scaleXFixed32 = Fixed32.div(currentWidthFixed32, requiredWidthFixed32);
int scaleYFixed32 = Fixed32.div(currentHeightFixed32, requiredHeightFixed32);
Where does this code come from? The standard Java class libraries do not have Bitmap, Fixed32 and EncodedImage image classes, so you need to include whichever library has those in your classpath.