Creating Very Big images from Flex
Hi,
I am trying to create a small image manipulator. In which I am having Some image in background and then I am adding other
images, text etc. to it and capturing bitmapdata of the entire canvas and saving the image at the server side. Now my issue is that I want to convert those images (created from flex bitmapdata via byteArray ) to very large images i.e. in the dimenstions of the feets.Can any body suggest how to acheive this.As i tried to scale the bitmapdata the quality gets down repildly. And again there is the limiations of the size in bitmap data,and hence my am far enough from my
actual requirement.
Thnx in Advance,
Shardul Singh
This code works:
public class ImagePanel extends JPanel
Image bufferedImage;
Image grass;
//grass image is loaded up here;
public void paint(Graphics g)
super.paintComponent(g);
bufferedImage = createImag(15*increm,14*increm);
Graphics bufferedGraphics = bufferedImage.getGraphics();
bufferedGraphics.drawImage(grass, 0, 0, this);
bufferedGraphics.drawImage(grass, 32,32, this);
bufferedGraphics.drawImage(grass, 64,64, this);
g.drawImage(bufferedImage, 0, 0, this);
However this code does not:
public class ImagePanel extends JPanel
Image bufferedImage;
Image grass;
//grass image is loaded up here;
public void setUpImage()
bufferedImage = createImag(15*increm,14*increm);
Graphics bufferedGraphics = bufferedImage.getGraphics();
bufferedGraphics.drawImage(grass, 0, 0, this);
bufferedGraphics.drawImage(grass, 32,32, this);
bufferedGraphics.drawImage(grass, 64,64, this);
public void paint(Graphics g)
setUpImage();
super.paintComponent(g);
g.drawImage(bufferedImage, 0, 0, this);
I want to have a method that sets the image up so I can move it around, add to it, take away from it, etc. that is what I want setUpImage() to do. I can't figure out why it works if I do it the first way and not the second way.
Similar Messages
-
Creating a .jpg image from with in the J2ME app
Hi,
I want to send a document to the printer over bluetooth to print.
For that I searched on net, but couldn't find any APIs supported by J2ME to print it. I also found a link http://www.hcilab.org/documents/tutorials/Brother/ where I found that I can send the data by creating an image and then writing data (text or image ) in to it, and then sending that image to print.
Image img = Image.createImage(816, 40);
Graphics g = img.getGraphics();
g.setColor(0, 0, 0);
g.setFont(Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD,Font.SIZE_LARGE));
g.drawString("Printing test from "
+ System.getProperty("microedition.platform") + " on "
+ new Date(), 10, 10, 0);
driver.print(img, btAddr);This code is working fine on this printer.
I am using HP 460cb printer, and I tried the same thing, but am not getting any results. Can any one of you tell me what mistake am I making.
Image blankImage = Image.createImage(SpotBilling.MAX_IMG_WIDTH, SpotBilling.MAX_IMG_HEIGHT);
Graphics g = blankImage.getGraphics();
g.setColor(0,0,0);
g.setFont(Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_PLAIN, Font.SIZE_SMALL));
g.drawString("Printing test on Wednesday - 18th Jan, 2006", 10, 50, Graphics.TOP|Graphics.LEFT);
g.drawImage(imgTest, 60, 150, Graphics.HCENTER | Graphics.VCENTER);
int width = blankImage.getWidth();
int height = blankImage.getHeight();
int y = 0;
os.write(CMD_UNIVERSAL_EXIT);
for(int i = 1; i<=height; i++){
blankImage.getRGB(temp, 0, width, 0, y, width, 1);
byte[] pixels = new byte[width];
for (int x = 0; x < temp.length; x++) {
pixels[x] = (byte) ((((temp[x] & 0x00FF0000) >> 16)
+ ((temp[x] & 0x0000FF00) >> 8) + (temp[x] & 0x000000FF)) / 3);
// Transfer Raster Graphics
os.write(TRANSFER_RASTER_DATA);
byte[] len = numToDecimal(pixels.length);
os.write(len);
os.write(DATA);
os.write(pixels);
y++;
}I have another query, if I can not do this. Is there any way I can create a .jpg image from with in the J2ME application.
I have some text and an image that I get by invoking camera from the code and then capturing a picture. I need to combine them both, and then send it to the printer.
If there is any way, I can convert this blankImage mentioned above (containing both text and Image), please provide me the solution.
Any document or any source code is appreciated.
regards,
AshishI have succeeded in creating a mutable image that contains text and image (.png), through
Image img;
img = Image.createImage(50, 60);
protected void paint(Graphics g){
g.drawImage(img, getWidth()/2, getHeight()/2, Graphics.HCENTER | Graphics.VCENTER);
Graphics graph = img.getGraphics();
graph.setColor(0, 0, 0);
graph.setFont(Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD,
Font.SIZE_LARGE));
graph.drawString("Printing test from "
+ System.getProperty("microedition.platform") + " on ", 10, 10, 0);
graph.drawImage(image, img.getWidth()/2, img.getHeight()/2,Graphics.HCENTER|Graphics.VCENTER);
graph.fillArc(0,0,10,10,0, 360);
}Now I want to create a .jpg image of this img image(Mutable image).
What I am doing is that,
1. I am converting this image in to int array, using getRGB() method.
2. Then I am converting int array in to byte array.
3. And then I am opening a file(extension is .jpg)
4. Then I am sending this byte array in to the file which is .jpg
The .jpg file is getting created, but the data in it is very absurd, like yyyyyyyyyyyyyyyyyyyyyyyy.
Please help me in this matter.
Regards,
Ashish -
Can i create a single image from multiple images in lightroom?
Can i create a single image from multiple images in lightroom?
Like a panorama, a composite or focus stack? Have you tried the Lightroom forum?
Photoshop Lightroom -
Creating an xdp file from flex/java application
Hi,
I have an application in Flex 4 and As 3.When I click a button in flex application I have to generate a file in java with
extension xdp.When I try this locally(Run as java application) the file is generating correctly.When i compile the applic
ation and try it, the file is not writing correctly.Do someone have any idea about creating an xdp file from flex application?
i am using blazeds to connect java and flex4.When i opens the file in notepad the file is writing correctly.There is only problem in openig an xdp file...
please help me.specifically:
Runtime.getRuntime().exec("filename.exe") -
How to create an Average Image from Gray Scale (8 bits) JPEG Images
I�m trying to create a mean image from 9 JPEG Images, but this mean image has lots of "noise", is distorced, and doesnt�resemble at all the original ones.
I need this mean image so I�ll correlate each of the original ones to find out the best image I�m going to choose ussing NCC (normalized cross correlation coeficient).
When I use setRGB(x,y,rgb), it returns diferent "images" according to the number of zeros, for ex.: rgb = 028028028 is different from 28028028 and from 282828. I can�t find a way to work it out.
My algorithm is the folowing:
File f;
double [] [] pixels = null;
Color [] [] tempPixel = null;
Integer [] [] byte0 = null;
Integer [] [] byte1 = null;
Integer [] [] byte2 = null;
Integer [] [] byte3 = null;
Integer [] [] tempPixels = null;
mean = null;
int w,h;
fileNames = new String[numFrames];
for (int i=1; i<numFrames; i++){
fileName = path + "Frame#" + i + ".jpg";
fileNames[i-1] = fileName;
// just for getting width, height, for configuring pixels array and
// buffered images - mean & best.
fileName = path + "Frame#8.jpg";
f= new File(fileName);
try{
temp = ImageIO.read(f);
}catch(IOException io){ return false;}
w = temp.getWidth();
h = temp.getHeight();
mean = new BufferedImage(w, h, BufferedImage.TYPE_BYTE_GRAY);
pixels = new double [w][h];
byte0 = new Integer [w][h];
byte1 = new Integer [w][h];
byte2 = new Integer [w][h];
byte3 = new Integer [w][h];
tempPixel = new Color[w][h];
tempPixels = new Integer[w][h];
f=null; temp = null;
//reset pixels values.
for(int x = 0; x < w; x++){
for(int y = 0; y < h; y++){
byte0[x][y] =0;
byte1[x][y]=0;
byte2[x][y]=0;
byte3[x][y] = 0;
pixels[x][y] = 0;
// read each file (image), and according to W & H and collects the
// pixels values.
for(int j=0; j<numFrames-1; j++) {
f = new File(fileNames[j]);
try{
temp = ImageIO.read(f);
}catch(IOException io){ return false;}
if(temp!=null)
for(int x=0 ; x< temp.getWidth(); x++){
for(int y=0; y<temp.getHeight(); y++){
tempPixel[x][y] = new Color(temp.getRGB(x,y));
pixels[x][y] = pixels[x][y] + temp.getRGB(x,y) / 16581375;
//BLUE
byte0[x][y] = byte0[x][y] + (tempPixel[x][y].getBlue());//tempPixel[x][y].getBlue(); //& 0xff;
//GREEN
byte1[x][y] = byte1[x][y] + (tempPixel[x][y].getGreen());// >>8 & 0xff;
//RED
byte2[x][y] = byte2[x][y] + (tempPixel[x][y].getRed()); //>>16 & 0xff;
//ALPHA
byte3[x][y] = byte3[x][y] + (tempPixel[x][y].getAlpha()); //>>24 & 0xff;
f=null;
}//end of loop for j<numFrames
String t0, t1, t2, t3;
for(int x=0 ; x< temp.getWidth(); x++){
for(int y=0; y< temp.getHeight(); y++){
byte0[x][y] = byte0[x][y] / numFrames;
if((byte0[x][y])<10)
t0= "0" + byte0[x][y].toString();
//else if((byte0[x][y])>=10 & ((byte0[x][y])<100))
// t0 = "0" + byte0[x][y].toString();
else
t0 = byte0[x][y].toString();
byte1[x][y] = byte1[x][y] / numFrames;
if((byte1[x][y])<10)
t1= "0" + byte1[x][y].toString();
//else if((byte1[x][y])>=10 & ((byte1[x][y])<100))
// t1= "0" + byte1[x][y].toString();
else
t1 = byte1[x][y].toString();
byte2[x][y] = byte2[x][y] / numFrames;
if((byte2[x][y])<10)
t2= "0" + byte2[x][y].toString();
//else if((byte2[x][y])>=10 & ((byte2[x][y])<100))
// t2 = "0" + byte2[x][y].toString();
else
t2 = byte2[x][y].toString();
byte3[x][y] = byte3[x][y] / numFrames;
if((byte1[x][y])<10)
t3="0" + byte3[x][y].toString();
else
t3 = byte3[x][y].toString();
pixels[x][y] = (pixels[x][y]/numFrames) * 16581375;
try{
String rgbs = t2+t1+t0;
Integer rgb = Integer.valueOf(rgbs);
//System.out.println("Valor do rgb: " +rgb);
mean.setRGB(x,y,(int)pixels[x][y]);
}catch(NumberFormatException nfe){
System.out.println("ERROR: Integer to STRING: " + nfe);
return false;
}// end of catchIt�s ok, I�ve already found the solution.
Thanks. -
How do I create a JPG image from a clip
I need to create a jpg image from a movie clip. Is making a freeze frame the same and creating a jpg?
A jpg image is saved by FCE in a new file, while a freeze frame in FCE is a still picture used for a sequence in a project, but not saved separately.
To make a jpg, position the playhead in the timeline on the frame you want to save and Export/Using QuickTime Conversion and select Format: Still Image.
You are asked for a file name.
To make a freeze frame, position the playhead in the timeline on the frame you want to reuse within the project and Modify/Make Freeze Frame. This leaves a new still in the viewer: you can drag it to the timeline, drag it to the browser, etc.. - However this does not create a separate file but stays embedded in the project where it is used.
Piero -
How do i create a jpeg image from clips in fcp
how do i/can I create a jpeg image from clips in fcp?
StephenSelect clip in timeline and place the playhead over the frame you want to save as a JPEG. Open the share window ( Button on far right of tool bar) and select 'Save current frame'. If you don't see that option click on add destination and select the Save current frame choice. It will be added to your share options.
-
Why suddenly unable to create a disk image from a CD?
I successfully created a disk image from a CD only 5 days ago. Now when I try to create a disk image from a CD (with Disk Utility) the Superdrive rumbles along for sveral minutes, while the progress bar indicates that it has reached the end of its progress.
Only after all that does a dialog box indicate:
"Unable to create "___.dmg"-Invalid Argument. "
I haven't added software but did upgrade to iTunes 6. Doubtful that could affect my abilty to create a disk image.
Would someone kindly shed some light on why this may be happening?
SteveIs it strange that this problem seems CD-specific?
Some CDs are copy-protected and some CDs are not copy-protected; so, no, it's not strange at all that you should be able to copy some CDs and not be able to copy others.
Tuttle
1682/8380 -
How to create a georaster image from vector polygons
I want to create a georaster image from polygons. I know i can use it gdal_rasterize utility but want to find out if i can do it within Oracle itself. Are there any vector or georaster functions i can use?
Hi, there is no such functions within oracle to do that. thanks.
-
How do you create a still image from a video using IMovies 11?
How do you create a still image from a video using IMovies 11 on a Pro Mac?
The simplest way is to do a simple screen capture.
-
Creating a Disk Image from Compressor Fails
Hpefully some one can help me out here.
Here's whats going on and I've tried this on 2 different systems (iMac 24 inch OSX 10.9.4,Nvidia GeForce GT750M 1 GB, 3.1 Ghz i7 Processor 1 TB Fusion Drive, 16 gigs of ram & a iMac 27 Inch OSX 10.9.4 Nvidia GeForce GTX780M 4GB, 2.5 Quad-Core i7, 16 gigs of ram 1 TB Fusion Drive, both have the USB Super Drive from Apple connected to them)
Both are running Compressor 4.1.2. I'm trying to make a disk image from a Apple Pro Res 422 HQ Quicktime 29.97 DF (drop frame, NTSC) The file is big since it's HQ so it takes a while to compress. I'm using the Create DVD preset in compressor and choosing " When Done: Create DVD" then below that "Output Device: Hard Drive" Because I want to have a disk image for back up and future burning so I don't have to tie up any systems doing this again.
It get's the the very end where it has that disk burning icon come up on the dock and then a warning comes up saying that there was a "error making the disk" and then that's it. I want to be able to create a disk image. Old compressor (3.what ever) works great, takes a lot longer to compress things but at least I haven't run into this issue with it.
I've had my destination set to the internal drive's, external drives .... you name it I've tried to save it in different places. I've added a background picture, removed it, nothing seems to work ....
Please help and much appreciated if you can help me out here.
CheersYes it is. This should help you.
Mac OS X 10.4 Help: Burning a CD or DVD
Burning Data CDs and DVDs in Leopard and Tiger
Mac OS X 10.5 Help: Burning a disk image on a CD or DVD with Disk Utility
Mac OS X 10.5 Help: Burning a CD or DVD -
Create Quad Print Image from 4 image files
Many print programs facilitate a layout of 4 pictures (my preference - others available) in one image to print. How would I go about creating a single image that contains 4 pictures or files in a single jpg file? can it be done? This is not a question about print. It is about creating a single file from 4 seperate files (images).
Ron,
1. Open new, blank file. For example: Size 8x10, resolution 300 px/in, color RGB, background - white.
2. Resolution for printing should be 240-300 px/in for good result. It is desirable that resolution of the component pictures be about the same. Check in Image>resize>image size.
3. Copy/paste each picture to the background set up in step #1. Each picture will be on its own layer
4. Use move tool to position the pictures, and to resize with the corner handles while holding down the shift key.
HTH,
Ken -
Creating a disc image from an iso file
I have a samsung Bluray player that requires and update. I downloaded the file (which is a zip), then expanded it. It is an iso file. I need to create a disc image (not a simple burn to a cd) in order to update my samsung player. How do I do that? Disc Utility?
Sorry, I should have been more clear. The ISO file is on my desktop. I didn't understand how to get it to show in DU, but when I hit BURN, a navigation window opens...thank you.
-
Example of creating one big image castmember from many
Hi
We have a puzzle, build out of meny small image castmember
(rectangles and
numbers)
Rextagles are filled with some texture, numbers are layed
over reactangles
What I need is to create one castmember, containing completet
puzzle, with
all small pieces on their places
Is it possible to do without xtras?
Please send me sosome example of code?
I thought about DirectImage or Ravware Image Xtra, probably
some have
examples using these xtras
Thanx in advance,
any help will be appreciated
YurijBut I also need to export then created image castmember
Is there a way to export image without xtras?
I need most formats, min is BMP and JPG
If xtra is required, what is the best in price and quality?
"a?ex" <[email protected]> wrote in message
news:e8gh1d$2jq$[email protected]..
> you don't need an xtra.
> you can use the built-in imaging lingo commands to
compose the image and
> create a new castmember.
>
>
> basically:
>
> -- create an image object:
> imageObject = image(width, height, depth,
<useAlpha>, <paletteref>)
> -- copypixels something into it:
> imageObject.copyPixels(member("tile").image, targetrect,
member("tile").rect)
> -- cerate new member:
> newmember = new(#bitmap)
> -- assign the image object
> newmember.image = imageObject
> -
How to create one clean image from multiple shots?
I tried searching, but I really don't know how to search for this so I came up empty.
I have multiple pictures of the same product but had to focus on different parts to get those parts in focus. As you can imagine, this meant other parts were out of focus.
I seem to remember during one of the "CS3 is cool" seminars I attended that something along the lines of what I'm hoping to do is possible.
I would like to merge these images together to form one image with everything in focus. Exposure is the same on each of them.
Is this possible (and if so, how) or am I dreaming?
Using PS Extended.Thanks for all the suggestions, guys. I'll give those a shot and see if they work enough. If it looks like it'll take too long right now, I'll just try to find a better angle where I can get it "good enough" as I have many more pictures I need to take of cables and wires.
Super fun.
To answer some of the questions posed to me:
I looked at photomerge, but that looked to me like more of a way to make panaramic (sp?) pictures from multiple shots. I may tinker with that a bit though as it's something I'd like to use for other things as well.
I don't need this very often so this would not be a common practice, but if I knew how to do it, that would open some more options for me and I'd likely do it more often but still not regularly.
It's not a super closeup, though I've had need of this operation on those in the past; wound up just shooting differently and settling for second or third best.
I don't use what anyone would call a photo studio. It's a 4x8' piece of styrene tacked to the wall and a fold-up 6' table in a room with flourescent lighting (please try to restrain your laughter). The company's camera, while decent, is very old: Sony DSC-D770. This is why I bought my own Sony DSC-F828 2-3 years ago. Not the best but much better (the tiny-to-sometimes-larger purple haze around most edges is what bugs me the most). And my setup is just my camera on a tripod. I'm not fooling myself about my skills at photography; I'm very small-time, but I still need my shots to look good.
(Out of respect for actual photgraphers, I don't even call myself a photographer. I "shoot product photos" or "do product photography" which still sounds a bit too lofty, but....)
The product itself is the Velleman TLM12, a test tweezer for SMD devices. I'd like to get a "long" shot of it but that angle makes the tip and leads get out of focus in most shots and they're tiny so it's really noticable. I can get every part in sharp focus in 3-4 shots, but not in one at the angle I'm hoping to get.
I use a macro lense when I need to get big pictures of 1" connectors and the sort, but this is way too big for that and the macro has a very small area of what would be in focus so this problem would be compounded far more than I'm experiencing now.
I think layer masks might be the quickest way to achieve what I'm trying for here. Like I said, I don't need this often but if I knew how, I'd do it more frequently and might even create an action to do this faster.
Thanks again, everybody. HUGE help. :)
Maybe you are looking for
-
After upgrading to Mavericks my Mac Pro does not open my double CD drives when I hit eject in the menu bar it locks up (please Help)?
-
Copy and Paste of RKFs and CKFs
Hi All, How can i copy a RKF and paste/use it and change its tech name and a few restrictions among all restrictions. Regards Arun
-
Migration Assistant issues, Mavericks
So this has been frustrating. Two MBPs connected by ethernet, both running updated Mavericks. Both have wifi turned off, both have firewalls turned off, both manually assigned IPs on same network (finally got to all of those things being done after o
-
PGI is not allowed in past date
Dear Experts, I have a situation where we want to post the PGI/Delivery on past date. I recieved the stock on 20-May so system should allow the PGI/Delivery on 20-May. But when trying to do PGI, system is throwing the error message "Deficit of BA unr
-
Hi! Last couple a days I'm having problems with angry birds on my E6! The touch screen doesn't respond! Has anybody have the same problem!? Have some suggestions what to do?