Exporting resulting Applets as jpg,gif or png
Hello, i am currently working on an applet, included in a webapplication.
The insurance agent make a drawing of an accident within this applet and i need to export the result as a file. Does anyone know how ? is this even possible with applets ?
hopefully someone can help me
greetings...
The insurance agent make a drawing of an accident
within this applet and i need to export the result as
a file. Does anyone know how ?Before posting these questions, try searching the forum. If you search (Google or this site) for "image capture" or "save image", you'll find hundreds of posts and lots of code.
Similar Messages
-
EXPORT chart (graph) to JPG, GIF .etc
Hello.
I have a problem with this. I want to export chart into SMARTFORM, but must have JPG or GIF picture. the question is - how export chart, graph to picture format?
Tkanks very much.hi daniel,
you can export picture in smartforms but it must be in bitmap format so u must change the format and then in your samartform creare new node or do right click create->graphic and give the name of that graphic and object 'GRAPHICS and ID is BMAP, for exporting the grachic use the transaction se78. if it is use full for u then plz give reward points.
Thanks
Anirudh Saini -
Help with exporting gradient background as jpg
Hi there! I'm totally new to this forum & very new to
fireworks, so go easy on me!
I am designing for QVGA smartphone/PPc screens & find
that when I create a gradient in fireworks MX (version 6) &
then export it as a jpg, on the phone/PPC screen the gradient is
filled with big blocks of colour rather than smooth transitions
between them, making the overall effect more like lines or blacks
of colour than a smooth gradient. I am exporting the jpgs at the
highest quality settings (100%).
Can someone help? Is it just my lack of technique when
blending colours? If so is there a tutorial somewhere? Or can I
export in a different format? The screens I design are controlled
by an xml layout file, & will accept .jpg, .gif & .bmp
Thanks!Yes, as I mentioned earlier in this thread, the bit depth
could be the
issue. Try setting your monitor to 16 bit and experiment with
gradients
at that bit depth. Keep the color range and the tonal range
less extreme
(light blue to dark blue for example, rather than white to
dark blue)
similar an you might be able to get something a little more
pleasing.
Jim Babbage - .:CMX:. & .:ACE:.
Extending Knowledge, Daily
http://www.communityMX.com/
CommunityMX - Free Resources:
http://www.communitymx.com/free.cfm
.:Adobe Community Expert for Fireworks:.
news://forums.macromedia.com/macromedia.fireworks
news://forums.macromedia.com/macromedia.dreamweaverdrblow
wrote:
> Thanks again for the replies y'all!
>
> As far as I can gather from web sources, the PPI of my
smartphone QVGA screen
> is 96ppi. Setting the canvas PPI does not seem to affect
the quality of either
> jpg, gif or bmp formats on export, once they are on my
phone screen. It would
> appear form web sources that the phone screen displays
16 bit colour depth.
>
> I have tried to make the gradient as smooth as possible
& on my laptop screen
> it looks really good. Any more suggestions?
>
> Thanks.
> -
Jpg,gif, and gui's
hey guys, I just started learning to code gui's... but my book is vague about inserting jpg or gif.....
I was using:
ImageIcon b = new ImageIcon("board.jpg");
I keep getting a blank canvas..
Can someone help me with siimple code for making a gui with just a picture in it
thx@OP...
1) The convention used in your sample code assumes
that the image source file is in the executing
directory or classpath.... if not you will need to
provide the full path...
eg: "C:/Some
Directory/SomeOtherDir/Myimage.jpg/.gif/,png"or in a directory off the root:
root-
/images
/classes
/com
/whatever
Then ImageIcon icon = new ImageIcon("images/myImage.gif"); will load
>
2) If the Image is large, (not in size only, btw),
you need to use an ImageTracker or you could resort
to the
Toolkit.getDefaultToolkit().getImage("somePath")
method to ensure that the Image is loaded to
completion prior to the gui being rendered.. any
delays will see the ImageIcon being updated after the
gui is rendered, naturally producing no image.....
ImageIcon uses a ImageTracker to load images -
Acrobat X Pro - Export multiple PDFs to JPG
In Acrobat 9 Pro I am able to export multiple pdfs to jpg using file--->export multiple.... In Acrobat X I can't seem to find this funtionality. Any ideas?
Thanks.I tried this script and it did work but I needed to export to PNG rather than JPG. I could not see a way to do that without actual scripting, which I don't know how to do. So I opened the script linked here in Textpad and just changed "jpg" to "png" and it worked - happy day for me! If anyone would like to download this action, you can find it here: http://ccl.rutgers.edu/~lindaeve/acrobatx/Export_to_PNG.sequ
Linda -
Why Does Reading A Gif Or Png Containing Transparent/Alpha Pixels Fail?
I'm trying to read in gif or png with transparent pixels into a BufferedImage so that I can create a font inside of Java. Right now, I'm defaulting to the assumption that the background of the font image is white. However, I want to make it so that the font background is whatever pixels happen to be transparent. The images I'm reading in have only two colors: black and white. I set all the white pixels to transparent when creating the images in hopes that I could do a check for all pixels with Alpha < 255. I have tried numerous possible solutions, such as saving the png files with different applications, ImageIO.read, and Toolkit.getDefaultToolkit().createImage, and JAI.The types of the resulting BufferedImages have varied between TYPE_BYTE_BINARY, TYPE_BYTE_INDEXED, and TYPE_CUSTOM. What I want is TYPE_INT_ARGB so I can get the dang alpha pixels.
1. Is there a way to read in alpha pixels of png or gif (doesn't have to be both) from within the main Java libraries as a BufferedImage with type TYPE_INT_ARGB? If so, how?
2. Failing that, is there a way to read in alpha pixels of png or gif (doesn't have to be both) by using a decent external library as a BufferedImage with type TYPE_INT_ARGB? If so, how and with which one?
This has been frustrating the heck out of me, since I thought this was something very simple to do, but I've spent two days poring over the entire Internet for a possible solution.package aerobush.ocr.translator;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Toolkit;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.DataFlavor;
import java.awt.image.BufferedImage;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import javax.imageio.ImageIO;
import javax.imageio.ImageReader;
import javax.imageio.stream.ImageInputStream;
import javax.media.jai.JAI;
import javax.media.jai.PlanarImage;
import com.sun.imageio.plugins.png.PNGMetadata;
public class ImageUtils
static public BufferedImage readPng1(
File pngFile ) {
try {
BufferedImage image = ImageIO.read(pngFile);
return image;
catch (Exception e) {}
return null;
static public BufferedImage readPng2(
File pngFile ) {
try {
BufferedImage image = (BufferedImage) Toolkit.getDefaultToolkit().createImage(
pngFile.getAbsolutePath());
return image;
catch (Exception e) {}
return null;
static public BufferedImage readPng3(
File pngFile ) {
try {
final PlanarImage planar = JAI.create(
"FileLoad",
pngFile.getAbsolutePath());
BufferedImage img = planar.getAsBufferedImage();
return img;
catch (Exception e) {
e.printStackTrace();
return null;
static public BufferedImage readPng4(
File pngFile ) {
try {
ImageInputStream stream = ImageIO.createImageInputStream(new FileInputStream(
pngFile));
ImageReader r = ImageIO.getImageReadersByFormatName(
"png").next();
r.setInput(
stream,
true,
false);
PNGMetadata metadata = (PNGMetadata) r.getImageMetadata(0);
BufferedImage i = r.read(0);
if (!i.getColorModel().hasAlpha() && metadata.tRNS_present) {
int alphaPix = (metadata.tRNS_red << 16) | (metadata.tRNS_green << 8)
| (metadata.tRNS_blue);
BufferedImage tmp = new BufferedImage(
i.getWidth(),
i.getHeight(),
BufferedImage.TYPE_INT_ARGB);
for (int x = 0; x < i.getWidth(); x++) {
for (int y = 0; y < i.getHeight(); y++) {
int rgb = i.getRGB(
x,
y);
rgb = (rgb & 0xFFFFFF) == alphaPix ? alphaPix : rgb;
tmp.setRGB(
x,
y,
rgb);
i = tmp;
return i;
catch (IOException e) {}
return null;
}Edited by: oldbushie on Sep 13, 2009 2:07 PM
Edited by: oldbushie on Sep 13, 2009 2:08 PM -
Converting transparent GIF and PNG to JPEG
Hi,
I have been reading in various sample gifs and png files and converting them to jpeg via javax.imageio.
This works fine if there is no transparency colour defined in the png or gif file. But if it has a transparency colour, the resulting jpeg is messed up. Now, it appears the reason is because jpeg has no transparencies. So, my question is, how does one get rid of the transparency (assuming I want to convert it to 'white')?
For the record, I am calling
BufferedImage image= reader.read(0);Where reader is an ImageReader and I then convert "image" to jpeg.import java.awt.*;
import java.awt.image.*;
import java.io.*;
import java.net.*;
import javax.imageio.*;
import javax.swing.*;
public class LoseTransparency {
public static void main(String[] args) throws IOException {
URL url = new URL("http://java.sun.com/docs/books/tutorial/figures/uiswing/components/ButtonDemoFiles.gif");
BufferedImage bi1 = ImageIO.read(url);
int w = bi1.getWidth();
int h = bi1.getHeight();
BufferedImage bi2 = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
Graphics2D g = bi2.createGraphics();
g.setColor(Color.WHITE);
g.fillRect(0,0,w,h);
g.drawRenderedImage(bi1, null);
g.dispose();
JPanel p = new JPanel(new GridLayout(2,1));
p.setBackground(Color.YELLOW);
p.add(new JLabel(new ImageIcon(bi1)));
p.add(new JLabel(new ImageIcon(bi2)));
final JFrame f = new JFrame("LoseTransparency");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setContentPane(p);
f.pack();
SwingUtilities.invokeLater(new Runnable(){
public void run() {
f.setLocationRelativeTo(null);
f.setVisible(true);
} -
Photoshop CS3 does not recognise gif or png
When trying to open a gif or png, I receive the message:
"Could not complete your request because Photoshop does not recognise this type of file"
I am running CS3 and have just added the 10.5.3 update.I have a similar problem that suddenly appeared. When properly working, I can save a tif file as a jpeg (or other)and the tag "tiff" will switch to "jpg" in the save description. That does not work anymore. A same example is when I save a Photoshop document as a "tif" or "jpg" or "png," the save description does not change any more to the appropriate form. Meaning, if I took a document named "Mydoc.psd" and tried to save it as a "jpg," I would scroll in the "Format" bar down to "JPEG." BUT, the title of the document will remain as "Mydco.psd." When I try to open it by double-clicking on it, Photoshop will not recognize it. I must open it thru Photoshop only.
Got recommendations?
Thanks anyone. -
How may I make my screen shots default to a .jpg instead of .png
How may I make my screen shots default to a .jpg instead of .png?
Is there a preference somewhere?One easy way is:
Changing the File Format
In order to change the file format you must firstly open up a Terminal window (Applications/Utilities/Terminal.app), and type the following.
defaults write com.apple.screencapture type TYPE
For the command to work, you need to replace “TYPE” with a valid file format, the available options are:
png (default)
pdf
jpg
jp[2 (jpeg 2000)
gif
tiff
bmp
pict
tga
Once you have selected your format simply issues the command, placing the file format in it’s space. For example for a JPG, I would issue:
defaults write com.apple.screencapture type jpg -
Cannot edit JPG, GIF files stored in a SharePoint 2010 picture library
Created a SharePoint 2010 picture library to store .jpg, .gif images along with other types of images which were created using Adobe photoshop, Tiff etc.
Upon clicking on the .jpg, .gif files for editing purposes, they open in the browser instead of Photoshop so I cannot edit these files for this reason. Other types of image files are editable but not the jpg, gif files. File associations are already
in place for these files to open in Photoshop. Please advise.
Thank you,
MaheshYou can change the default application that opens while you click open document using DocIcon.xml which is present on the web front ends. Please look at this link which explains what you need to update in order to take care of your requirement.
http://msdn.microsoft.com/en-us/library/ms463701.aspx
Hope this helps.
Thanks, Mayur Joshi Blog: http://splearnings.blogspot.com/ -
Export Indd to EPS/JPG and set the file name for EPS/JPG file
Hi,
When I export the INDD to JPG/EPS, I want to set the file name with pageNumber for JPG/EPS files using javascript.
For Example
If I set the file name as EPSFile.eps, after exporting the indd(with 2 pages) to eps
,files are generating in the following name EPSFile_1.eps, EPSFile_2.eps.
but I want to set the file name as EPSFile_001.eps and EPSFile_002.eps using javascript.
anyone knows please reply for this.
Regards,
MubeenHi,
I tried the following code.
var JPGe = new File("Applications/PDF/JPG/file.jp");
app.activeDocument.exportFile(ExportFormat.jpg, );
when I use this code ,exported jpg file names are
file.jpg, file1.jpg,file3.jpg.
but ,I want the output file names as file_001,file_002,file_003,
Thanks,
Mubeen -
I have made a web page in HTML with several links to JPGs / GIFs. While text matter opens up perfectly, but not the images. Please help me.
== This happened ==
Every time Firefox opened
== User Agent ==
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; CTS Version; .NET CLR 1.1.4322; .NET CLR 2.0.50727)URL of that web page?
-
Store/Read JPG/GIF as file on Application server,cluster table/MIME Rpstory
Hello All ,
I was trying to build up a ImageStore proxy class to save JPG/GIF in the following ways .
u2022 File format on Application server with GUID reference / Whenever I need I can read/ archive it with ID#
u2022 In cluster table - Same concept
u2022 In MIME repository
I am thinking to use MIME APIs which are already available in SAP system . Let me know if anyone of you has any good suggestions/tips/tricks to do it .
BTW I have looked at Thomas Jung blog as a starting point .
/people/thomas.jung/blog/2007/09/05/abap-bitmap-image-processing-class
Thanks.
KhanSolved myself!!! Canu2019t believe. .. Donu2019t ask how ..Lots of coding involves.
-
Text saved as gif or png, when place over web graphics, has jaggies
Hi !
I'm new here but I've been using PS for years. What I want to know is this:
I use PHPbb forum software a lot and I am wanting to modify a logo on the top panel where I created a purple gradient as the header. on the left hand side I created a simple text in gif format that said "Test Site" These word are in white. I created the gif like this:
1) I created a new file as RGB, Transparent background.
2) Using the text tool I typed in "Test Site" on two different layers.
3) I chose IMAGE ->MODE->Indexed Color
4)In the dialog box box I chose the defaults ie:
Palette: Exact
Colors: 218
Forced: Web
Checked box: Transparency
Matte: None
And the rest were grayed out.
When I did a refresh on the website, my logo appears but it is not sharp and clean as it was in PS but rough and jaggie.
What am I doing wrong?
The same thing happens if I create a file in DW, create a layer with a background color and place the gif or png on top of the bkgd color.
I am using PS cs5 and viewing with Chrome. You can view the website at:
http://test.3ryd.com
Thanks,
PaulWelcome to the "wonderful" world of web development where the display of images is occasionally still in the 1990's! You have encountered one the more annoying issues with certain web browsers: Partial transparency barely works (especially in IE6 and earlier). Transparency is also known as the "Alpha Channel".
GIF images have been around forever and no one thought far enough ahead to create partial transparency options for them. They are really only good for rectangular, non-transparent images and small icons. Use PNG and JPEG for everything else.
If you don't care about IE6, then you can save your image as a PNG and retain transparency information. Firefox, Chrome, IE7 and later, and Safari all display transparent images without issue. If you DO care about transparency in IE6, then you're in for a world of hurt. Wikipedia has a bunch of "solutions" to the problem with each one having pros and cons:
http://en.wikipedia.org/wiki/Portable_Network_Graphics -
How to export result set from mysql query browser to .sql in oracle
Hi folks:
I was trying to export result set from MySql query browser to Oracle. I could able to do
File->Export Result Set-> Excel format...
What I am trying to get is .sql file so that I can run it as a script in my oracle db. Is there any way we can get .sql file with inserts and delimeters ....?
Did you guys get my question.?
Please throw some light on this....
Could be very appreciable ....
Thanks
Sudhir NaiduHi
Create a sql statement which generates the insert statements.
Something like this:
select 'insert into table1 (column1, column2, column3) values (' ||
column1 || ', ' || column2 || ', ' || column3 || ');' from table 1;
The || sign is the string concatenation sign in Oracle, replace it the appropriate sign in MySql. Export the result set of this query into a file, and you can run it in a SqlPlus.
Ott Karesz
http://www.trendo-kft.hu
Maybe you are looking for
-
How can I open a new window for a (calculated) PDF?
Hi, I have a BSP application with MVC. The start page is a HTML/HTMLB page with some buttons. If you click on the buttons, you get a PDF document in the same browser window. I generated the PDF over smart forms from table/Cluster data. I call the con
-
Encore DVD 4:3 or 16:9
Heelo Everyone, I need a bit of a help. I have a project but not sure what to do.I want to make DVD using Encore DVD.I have Several Video Clips which will be the DVD. The problems are: 1.half of the video clips are 4:3 aspect ratio and the other half
-
How to display only specified length of characters in text control
Hi, I am using text control in swf file. In this file, i want the display text upto 15 charaters and if more, then present with [.....] Please provide solution for this.
-
Transported Roles not Visible for the User Log-in
I have three roles in the development system. These roles show up in the top level navigation for the users in the dev system. All these roles and the underlying BSPs are transported to QA successfully. I could assign them to users without any pro
-
There seems to be quite a bit of confusion over the actual syntax for the user and group filters on the Forms Based Authentication Ldap Role and membership providers.. MSFT isn't really clear and there is a universal confusion in the blogsphere. I t