Prob in displaying de whole image in a canvas
hi all,
i m trying to display de sys image in a canvas n its workin.. de prob is de whole image is not visible as de canvas size is smaller than image size... de same occurs when applying images to JButton...
any suggestions??????
Apply an AffineTransform with the right scale values to the graphics object before you draw the image. I think there were some recent topics on exactly the same thing... so you can check those out too.
-Thomas Moulia
Similar Messages
-
IPad retina via iOS simulator can not display the whole image (2048x1536)
Hi,
I am developing cartoon ebooks with iOS simulatort 7.0. The target device is iPad retina. I use the image whose size is 2048x1356. After building by iOS simulator--iPad retina, only center part of image was displayed. I hope to show the whole image with simulator, how should I do?
Thanks!You would do better to ask your question on the developers' forum. We are but simple users here....
-
How to fit to size to show the whole image in image display?
HI, I am using a control palette to display my video images using image display. However, the size is alway out of proportion. How do i show the whole image in the small box screen size. Basically how to fit to size for the images?
Solved!
Go to Solution.This should do the trick:
Norbert
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it. -
I am working on an extended IMAQ Display control using LabVIEWs XControl capabilities.
I need a copy of the original image passed to add some overlays which must not affect the original image. To achieve this I am creating a backup image in the "Init.vi" and deleting it in the "Uninit.vi". I am storing the reference of this image in the "Display State.ctl" which is part of every XControl.
As soon as I am adding an "IMAQ Image.ctl" to the Display State cluster, it is no longer possible to generate a probe of the Display State cluster for debugging purposses. I am always getting the message: "Failed to load or create probe."
Deleting the "IMAQ Image.ctl" from the cluster makes the probe working again.
Is it a bug or am I doing something wrong?
I am working with LabVIEW 8.5 and Vision 8.5.
Regards
Ingo BartschHello Mr. Bartsch,
is it possible for you to post a small example to reproduce the behaviour? It would be helpful to get a description in which way you use the typedef files.
I found a example/knowledge base where some informations were included to XControl and LV but not with Vision.
http://digital.ni.com/public.nsf/allkb/1DC1ADD2A136DA298625712C00635758?OpenDocument
Best wishes
Jan Kniewasser
Jan Kniewasser | Applications Engineer | Tel.: +49 89 7413130 | Fax: +49 89 7146035 -
Displaying a theme-based FOI layer as a whole image with javascript API v2
Hi,
I have looked the Oracle maps V2 tutorial developed in mvdemo.war application provided with Oracle Mapviewer v11.1.1.7. I have looked how to use theme-based FOI layers and I have not found how to set the "whole image" property for these layers. This feature is present in javascript API V1 and it greatly improves application performance. Our applications use this property very often.
Is this property present in javascript API V2 but not documented?
If it's not present, do you know if it will be?
How can we show a layer with many geometry features and obtain the same performance we have now with the whole image property?
Thanks,
ArturoHi,
since this is a very crucial feature for us I'm very interested in that functionality as well. Is there a comparable functionality in the V2 API or will it be available in feature releases?
Thanks
Dominik -
PS CC Clone Stamp moving whole image?
I have a problem that I hope someone may be able to help me with. When I use the clone stamp I 'Alt-Click' to select a point to clone from. When I try to actually do the cloning the whole image moves on top of the original image. I knew it would be hard to explain so a make a screen capture video of it to explain Photoshop Problem - YouTube
If anyone knows a cure for this I would greatly appreciate the help. This seemed to start after the last update of CC.
Here is some info about my system. Sorry if I'm not brief.
Adobe Photoshop Version: 14.2.1 (14.2.1 20140207.r.570 2014/02/07:23:00:00) x64
Operating System: Windows 7 64-bit
Version: 6.1 Service Pack 1
System architecture: Intel CPU Family:6, Model:10, Stepping:7 with MMX, SSE Integer, SSE FP, SSE2, SSE3, SSE4.1, SSE4.2, HyperThreading
Physical processor count: 4
Logical processor count: 8
Processor speed: 3411 MHz
Built-in memory: 7655 MB
Free memory: 5020 MB
Memory available to Photoshop: 6697 MB
Memory used by Photoshop: 100 %
Image tile size: 1024K
Image cache levels: 4
Font Preview: Medium
TextComposer: Latin
Display: 1
Display Bounds: top=0, left=0, bottom=1080, right=1920
Display: 2
Display Bounds: top=0, left=-1920, bottom=1080, right=0
OpenGL Drawing: Disabled.
OpenGL Allow Old GPUs: Not Detected.
OpenGL Drawing Mode: Advanced
OpenGL Allow Normal Mode: True.
OpenGL Allow Advanced Mode: True.
AIFCoreInitialized=1
AIFOGLInitialized=1
OGLContextCreated=1
NumGPUs=1
gpu[0].OGLVersion="3.0"
gpu[0].MemoryMB=2047
gpu[0].RectTextureSize=16384
gpu[0].Renderer="GeForce GT 610/PCIe/SSE2"
gpu[0].RendererID=4170
gpu[0].Vendor="NVIDIA Corporation"
gpu[0].VendorID=4318
gpu[0].HasNPOTSupport=1
gpu[0].DriverVersion="9.18.13.1407"
gpu[0].Driver="nvd3dumx.dll,nvwgf2umx.dll,nvwgf2umx.dll,nvd3dum,nvwgf2um,nvwgf2um"
gpu[0].DriverDate="20130209000000.000000-000"
gpu[0].CompileProgramGLSL=1
gpu[0].TestFrameBuffer=1
gpu[0].OCLPresent=1
gpu[0].OCLVersion="1.1"
gpu[0].CUDASupported=1
gpu[0].CUDAVersion="4.2.1"
gpu[0].OCLBandwidth=0
gpu[0].glGetString[GL_SHADING_LANGUAGE_VERSION]="1.30 NVIDIA via Cg compiler"
gpu[0].glGetProgramivARB[GL_FRAGMENT_PROGRAM_ARB][GL_MAX_PROGRAM_INSTRUCTIONS_ARB]=[16384]
gpu[0].glGetIntegerv[GL_MAX_TEXTURE_UNITS]=[4]
gpu[0].glGetIntegerv[GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS]=[192]
gpu[0].glGetIntegerv[GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS]=[32]
gpu[0].glGetIntegerv[GL_MAX_TEXTURE_IMAGE_UNITS]=[32]
gpu[0].glGetIntegerv[GL_MAX_DRAW_BUFFERS]=[8]
gpu[0].glGetIntegerv[GL_MAX_VERTEX_UNIFORM_COMPONENTS]=[4096]
gpu[0].glGetIntegerv[GL_MAX_FRAGMENT_UNIFORM_COMPONENTS]=[2048]
gpu[0].glGetIntegerv[GL_MAX_VARYING_FLOATS]=[124]
gpu[0].glGetIntegerv[GL_MAX_VERTEX_ATTRIBS]=[16]
gpu[0].extension[AIF::OGL::GL_ARB_VERTEX_PROGRAM]=1
gpu[0].extension[AIF::OGL::GL_ARB_FRAGMENT_PROGRAM]=1
gpu[0].extension[AIF::OGL::GL_ARB_VERTEX_SHADER]=1
gpu[0].extension[AIF::OGL::GL_ARB_FRAGMENT_SHADER]=1
gpu[0].extension[AIF::OGL::GL_EXT_FRAMEBUFFER_OBJECT]=1
gpu[0].extension[AIF::OGL::GL_ARB_TEXTURE_RECTANGLE]=1
gpu[0].extension[AIF::OGL::GL_ARB_TEXTURE_FLOAT]=1
gpu[0].extension[AIF::OGL::GL_ARB_OCCLUSION_QUERY]=1
gpu[0].extension[AIF::OGL::GL_ARB_VERTEX_BUFFER_OBJECT]=1
gpu[0].extension[AIF::OGL::GL_ARB_SHADER_TEXTURE_LOD]=1
License Type: Subscription
Serial number: 96040836709912865871
Application folder: C:\Program Files\Adobe\Adobe Photoshop CC (64 Bit)\
Temporary file path: C:\Users\Larry\AppData\Local\Temp\
Photoshop scratch has async I/O enabled
Scratch volume(s):
D:\, 931.5G, 635.4G free
C:\, 232.8G, 144.5G free
Required Plug-ins folder: C:\Program Files\Adobe\Adobe Photoshop CC (64 Bit)\Required\Plug-Ins\
Primary Plug-ins folder: C:\Program Files\Adobe\Adobe Photoshop CC (64 Bit)\Plug-ins\
Installed components:
ACE.dll ACE 2013/10/29-11:47:16 79.548223 79.548223
adbeape.dll Adobe APE 2013/02/04-09:52:32 0.1160850 0.1160850
AdobeLinguistic.dll Adobe Linguisitc Library 7.0.0
AdobeOwl.dll Adobe Owl 2013/10/25-12:15:59 5.0.24 79.547804
AdobePDFL.dll PDFL 2013/10/29-11:47:16 79.508720 79.508720
AdobePIP.dll Adobe Product Improvement Program 7.0.0.1786
AdobeXMP.dll Adobe XMP Core 2013/10/29-11:47:16 79.154911 79.154911
AdobeXMPFiles.dll Adobe XMP Files 2013/10/29-11:47:16 79.154911 79.154911
AdobeXMPScript.dll Adobe XMP Script 2013/10/29-11:47:16 79.154911 79.154911
adobe_caps.dll Adobe CAPS 7,0,0,21
AGM.dll AGM 2013/10/29-11:47:16 79.548223 79.548223
ahclient.dll AdobeHelp Dynamic Link Library 1,8,0,31
aif_core.dll AIF 5.0 79.534508
aif_ocl.dll AIF 5.0 79.534508
aif_ogl.dll AIF 5.0 79.534508
amtlib.dll AMTLib (64 Bit) 7.0.0.249 BuildVersion: 7.0; BuildDate: Thu Nov 14 2013 15:55:50) 1.000000
ARE.dll ARE 2013/10/29-11:47:16 79.548223 79.548223
AXE8SharedExpat.dll AXE8SharedExpat 2011/12/16-15:10:49 66.26830 66.26830
AXEDOMCore.dll AXEDOMCore 2011/12/16-15:10:49 66.26830 66.26830
Bib.dll BIB 2013/10/29-11:47:16 79.548223 79.548223
BIBUtils.dll BIBUtils 2013/10/29-11:47:16 79.548223 79.548223
boost_date_time.dll DVA Product 7.0.0
boost_signals.dll DVA Product 7.0.0
boost_system.dll DVA Product 7.0.0
boost_threads.dll DVA Product 7.0.0
cg.dll NVIDIA Cg Runtime 3.0.00007
cgGL.dll NVIDIA Cg Runtime 3.0.00007
CIT.dll Adobe CIT 2.1.6.30929 2.1.6.30929
CITThreading.dll Adobe CITThreading 2.1.6.30929 2.1.6.30929
CoolType.dll CoolType 2013/10/29-11:47:16 79.548223 79.548223
dvaaudiodevice.dll DVA Product 7.0.0
dvacore.dll DVA Product 7.0.0
dvamarshal.dll DVA Product 7.0.0
dvamediatypes.dll DVA Product 7.0.0
dvaplayer.dll DVA Product 7.0.0
dvatransport.dll DVA Product 7.0.0
dvaunittesting.dll DVA Product 7.0.0
dynamiclink.dll DVA Product 7.0.0
ExtendScript.dll ExtendScript 2013/10/30-13:12:12 79.546835 79.546835
FileInfo.dll Adobe XMP FileInfo 2013/10/25-03:51:33 79.154511 79.154511
filter_graph.dll AIF 5.0 79.534508
icucnv40.dll International Components for Unicode 2011/11/15-16:30:22 Build gtlib_3.0.16615
icudt40.dll International Components for Unicode 2011/11/15-16:30:22 Build gtlib_3.0.16615
imslib.dll IMSLib DLL 7.0.0.145
JP2KLib.dll JP2KLib 2013/10/29-11:47:16 79.248139 79.248139
libifcoremd.dll Intel(r) Visual Fortran Compiler 10.0 (Update A)
libiomp5md.dll Intel(R) OMP Runtime Library 5.0
libmmd.dll Intel(r) C Compiler, Intel(r) C++ Compiler, Intel(r) Fortran Compiler 12.0
LogSession.dll LogSession 2.1.2.1785
mediacoreif.dll DVA Product 7.0.0
MPS.dll MPS 2013/10/29-11:47:16 79.535029 79.535029
msvcm80.dll Microsoft® Visual Studio® 2005 8.00.50727.6195
msvcm90.dll Microsoft® Visual Studio® 2008 9.00.30729.1
msvcp100.dll Microsoft® Visual Studio® 2010 10.00.40219.1
msvcp80.dll Microsoft® Visual Studio® 2005 8.00.50727.6195
msvcp90.dll Microsoft® Visual Studio® 2008 9.00.30729.1
msvcr100.dll Microsoft® Visual Studio® 2010 10.00.40219.1
msvcr80.dll Microsoft® Visual Studio® 2005 8.00.50727.6195
msvcr90.dll Microsoft® Visual Studio® 2008 9.00.30729.1
ONCore8.dll ONCore 7.0.0.0
ONCoreFoundation8.dll ONCoreFoundation7 7, 0, 0, 0
ONDocument8.dll ONDocument 7.0.0.0
ONProxySupport8.dll ONProxySupport 1.0.0.0
PatchMatch.dll PatchMatch 2013/10/29-11:47:16 79.542390 79.542390
pdfsettings.dll Adobe PDFSettings 1.04
Photoshop.dll Adobe Photoshop CC CC
Plugin.dll Adobe Photoshop CC CC
PlugPlugOwl.dll Adobe(R) CSXS PlugPlugOwl Standard Dll (64 bit) 4.2.0.36
PSArt.dll Adobe Photoshop CC CC
PSViews.dll Adobe Photoshop CC CC
SCCore.dll ScCore 2013/10/30-13:12:12 79.546835 79.546835
ScriptUIFlex.dll ScriptUIFlex 2013/10/30-13:12:12 79.546835 79.546835
svml_dispmd.dll Intel(r) C Compiler, Intel(r) C++ Compiler, Intel(r) Fortran Compiler 12.0
tbb.dll Intel(R) Threading Building Blocks for Windows 4, 1, 2012, 1003
tbbmalloc.dll Intel(R) Threading Building Blocks for Windows 4, 1, 2012, 1003
updaternotifications.dll Adobe Updater Notifications Library 7.0.1.102 (BuildVersion: 1.0; BuildDate: BUILDDATETIME) 7.0.1.102
WRServices.dll WRServices Mon Feb 25 2013 16:09:10 Build 0.19078 0.19078
Required plug-ins:
3D Studio 14.2.1 (14.2.1 x001)
Accented Edges 14.2.1
Adaptive Wide Angle 14.2.1
Angled Strokes 14.2.1
Average 14.2.1 (14.2.1 x001)
Bas Relief 14.2.1
BMP 14.2.1
Camera Raw 8.4.1
Camera Raw Filter 8.4.1
Chalk & Charcoal 14.2.1
Charcoal 14.2.1
Chrome 14.2.1
Cineon 14.2.1 (14.2.1 x001)
Clouds 14.2.1 (14.2.1 x001)
Collada 14.2.1 (14.2.1 x001)
Color Halftone 14.2.1
Colored Pencil 14.2.1
CompuServe GIF 14.2.1
Conté Crayon 14.2.1
Craquelure 14.2.1
Crop and Straighten Photos 14.2.1 (14.2.1 x001)
Crop and Straighten Photos Filter 14.2.1
Crosshatch 14.2.1
Crystallize 14.2.1
Cutout 14.2.1
Dark Strokes 14.2.1
De-Interlace 14.2.1
Dicom 14.2.1
Difference Clouds 14.2.1 (14.2.1 x001)
Diffuse Glow 14.2.1
Displace 14.2.1
Dry Brush 14.2.1
Eazel Acquire 14.2.1 (14.2.1 x001)
Embed Watermark 4.0
Entropy 14.2.1 (14.2.1 x001)
Extrude 14.2.1
FastCore Routines 14.2.1 (14.2.1 x001)
Fibers 14.2.1
Film Grain 14.2.1
Filter Gallery 14.2.1
Flash 3D 14.2.1 (14.2.1 x001)
Fresco 14.2.1
Glass 14.2.1
Glowing Edges 14.2.1
Google Earth 4 14.2.1 (14.2.1 x001)
Grain 14.2.1
Graphic Pen 14.2.1
Halftone Pattern 14.2.1
HDRMergeUI 14.2.1
IFF Format 14.2.1
Ink Outlines 14.2.1
JPEG 2000 14.2.1
Kurtosis 14.2.1 (14.2.1 x001)
Lens Blur 14.2.1
Lens Correction 14.2.1
Lens Flare 14.2.1
Liquify 14.2.1
Matlab Operation 14.2.1 (14.2.1 x001)
Maximum 14.2.1 (14.2.1 x001)
Mean 14.2.1 (14.2.1 x001)
Measurement Core 14.2.1 (14.2.1 x001)
Median 14.2.1 (14.2.1 x001)
Mezzotint 14.2.1
Minimum 14.2.1 (14.2.1 x001)
MMXCore Routines 14.2.1 (14.2.1 x001)
Mosaic Tiles 14.2.1
Multiprocessor Support 14.2.1 (14.2.1 x001)
Neon Glow 14.2.1
Note Paper 14.2.1
NTSC Colors 14.2.1 (14.2.1 x001)
Ocean Ripple 14.2.1
Oil Paint 14.2.1
OpenEXR 14.2.1
Paint Daubs 14.2.1
Palette Knife 14.2.1
Patchwork 14.2.1
Paths to Illustrator 14.2.1
PCX 14.2.1 (14.2.1 x001)
Photocopy 14.2.1
Photoshop 3D Engine 14.2.1 (14.2.1 x001)
Photoshop Touch 14.0
Picture Package Filter 14.2.1 (14.2.1 x001)
Pinch 14.2.1
Pixar 14.2.1 (14.2.1 x001)
Plaster 14.2.1
Plastic Wrap 14.2.1
PNG 14.2.1
Pointillize 14.2.1
Polar Coordinates 14.2.1
Portable Bit Map 14.2.1 (14.2.1 x001)
Poster Edges 14.2.1
Radial Blur 14.2.1
Radiance 14.2.1 (14.2.1 x001)
Range 14.2.1 (14.2.1 x001)
Read Watermark 4.0
Reticulation 14.2.1
Ripple 14.2.1
Rough Pastels 14.2.1
Save for Web 14.2.1
ScriptingSupport 14.2.1
Shake Reduction 14.2.1
Shear 14.2.1
Skewness 14.2.1 (14.2.1 x001)
Smart Blur 14.2.1
Smudge Stick 14.2.1
Solarize 14.2.1 (14.2.1 x001)
Spatter 14.2.1
Spherize 14.2.1
Sponge 14.2.1
Sprayed Strokes 14.2.1
Stained Glass 14.2.1
Stamp 14.2.1
Standard Deviation 14.2.1 (14.2.1 x001)
STL 14.2.1 (14.2.1 x001)
Sumi-e 14.2.1
Summation 14.2.1 (14.2.1 x001)
Targa 14.2.1
Texturizer 14.2.1
Tiles 14.2.1
Torn Edges 14.2.1
Twirl 14.2.1
Underpainting 14.2.1
Vanishing Point 14.2.1
Variance 14.2.1 (14.2.1 x001)
Variations 14.2.1 (14.2.1 x001)
Water Paper 14.2.1
Watercolor 14.2.1
Wave 14.2.1
Wavefront|OBJ 14.2.1 (14.2.1 x001)
WIA Support 14.2.1 (14.2.1 x001)
Wind 14.2.1
Wireless Bitmap 14.2.1 (14.2.1 x001)
ZigZag 14.2.1
Optional and third party plug-ins:
Perfect Effects 8 8.1.0
Perfect Effects 8 Filter 8.1.0
Perfect Effects 8 Smart Filter 8.1.0
Plug-ins that failed to load: NONE
Flash: NONE
Installed TWAIN devices: NONE
Thanks to anyone who can understand the aboveOpen the Clone source panel, and recheck 'Clipped'.
-
DNGs produced from Hasselblad .fff files display a different image in Bridge and Camera Raw
Lately, not sure when this started exactly, Bridge CC (and Camera RAW 8.7) are displaying incorrect DNG images! Instead of showing the image I expect to see, I'll see an old image from days ago. This seems to carry on from Bridge through to Camera RAW. But then if I continue on to Photoshop with the image, it'll finally show the correct image.
I'm assuming this has something to do with DNG, because if I load another raw file type (like .fff or .NEF), it seems ok. Also it seems to be ok with DNGs produced from other cameras like Nikon D90.
My set up:
- Mac OS X 10.9.5 (Mavericks)
- Bridge CC
- Camera Raw 8.7
- Photoshop CC 2014
- Hasselblad H4D-50HI, I managed to fix the trouble by reinsatalling once again and running updates BEFORE opening bridge. It seemed that if I ran the update AFTER opening bridge I would get either an up to date status when checking for updates or I would get an install failure notice on all 4 updates that were trying to install. The updates were for camera raw, bridge and PS. I can't explain why but that helped a little. I also changed permissions on my whole user accnt to include read/write for all users. I can't say if this helped or not. I also had to go into my camera B/U files on a sepate HD and replace some of the CR folders I was using o nthe desktop. Still the CR files would not show a thumb nor a preview till I then went to each individual file inside that folder and purged the cashe for that file so it could repopulate the cashe yet again. This has been the strangest few days in PSCS6 history! Well my personal history. I will report back here if more quirks emerge. I would prefer quarks though....aloha, U
-
Why can't I see the whole image?
I can not see the whole image in the viewing area. All I get is a partial rectangular section, with the rest being either white, or checkerboard. It doesn't matter what size the image is, nor how many layers, or even whether I use the 32 or 64 bit versions of the software. I even have the same problem when I create a new image from scratch. It doesn't matter whether I reboot the system either.
I am using Windows Vista, on a two year old machine, but it does have a powerful processor, and 4GB of RAM. I've checked the system resources, and the CPU is only 25% occupied with 2GB or RAM to spare... so what gives?You need an updated display driver.
Go to the web site of the maker of your video card (not Microsoft), and locate their current release for your hardware and OS. Download and install, and it will almost certainly solve this issue.
-Noel -
Camcorder Display shows smaller image area than FC Viewer
The Camcorder Display (I use a Sony FX1 - but it is like that with every consumer camcorder) shows only about 90 percent !!! of the whole image, that I see, when I look at the video in Final Cut.
Specially in HDV it is very bad. I make videos mainy with stuctures of nature and arcitecture - it is very disturbing, that I cannot get exactly the image area, that I need. Only professional cameras offer an overscanning for the display image, that shows really the whole image, that is recorded!
One solution is to take my iBook with me - in iMovie I can see the live picture exactly as it is recorded.
But that's a very bad workaround to me. I don't want to carry my iBook with me all the time!
How do you solve this problem?
What are doing?How do you solve this problem?<<</div>
1. get a professional camcorder
- or -
2. use a pro monitor on location
- or -
3. learn to judge your actual image acquisition area - the part not displayed in the viewfinder.
The same thing applies to many 35mm and digital still cameras - even the "pro" models often don't show the entire image area in their viewfinders. It takes some practice, but you should be able to learn how to "see" beyond the viewfinder's limits so you know what you're actually recording.
-DH -
Can anyone tell me how to display alarge image(i.e. map.jpg) in a JPanel with a scrollbar so that I can scroll the whole image?
use a jlabel to display the image and add the jlabel in a jscrollpane(enable the scrollbars as neccasary) and add the jscrollpane to a panel r jframe..
-
Help displaying an image using the canvas!!!!!!!!
Hey guys
I don't know whether I am not grasping some concepts well.I have been going mad trying to get the code working
Here is the code
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.io.*;
* @author Administrator
* @version
public class MyMIDlet extends javax.microedition.midlet.MIDlet implements CommandListener{
private Display display;
private MyCanvas canvas;
private Command exitcommand = new Command("Exit",Command.SCREEN,1);
private Image source;
public MyMIDlet() {
protected void startApp() throws MIDletStateChangeException{
if (display == null){
initMIDlet();
protected void pauseApp() {
protected void destroyApp(boolean unconditional)throws MIDletStateChangeException {
exitMIDlet();
public void commandAction(Command c, Displayable d) {
if (c == exitcommand){
exitMIDlet();
protected void initMIDlet() {
display = Display.getDisplay(this);
canvas = new MyCanvas(this);
System.err.println("Canvas instiated succesfully");
canvas.addCommand(exitcommand);
canvas.setCommandListener(this);
display.setCurrent(canvas);
public void exitMIDlet() {
notifyDestroyed();
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
import java.io.*;
public class MyCanvas extends Canvas implements Runnable {
private MIDlet midlet;
private Image offscreen;
private Image currentimage;
private Graphics g;
//MID profile application
/** Creates a new instance of MyCanvas */
public MyCanvas(MIDlet midlet) {
this.midlet = midlet;
try{
currentimage = Image.createImage("/bird0.png");
}catch(IOException e){
System.err.println(e.getMessage());
if (currentimage!= null){
System.err.println("Image create successfully");
}else{
System.err.println("Image not created");
try{
Thread t = new Thread(this);
t.start();
}catch(Execption e){}
protected void paint(Graphics g){
Graphics saved = g;
int x = getWidth();
int y = getHeight();
g.setColor(255,255,255);
g.drawImage(currentimage,x,y,g.TOP|g.VCENTER);
public void run() {
repaint();
I know for a fact that the Canvas class 's paint method is called by the system and not the application. This poses a problem for me because I am not sure how to pass the image to the piant method, so that it can be painted.
When I run the program(using J2ME wtk04), this is the outcome.
Image created succesfully
Canvas instiatiated successfully
null
Here are my questions
1) when is the paint method precisely called by the system?after a reference to the canvas class is created?
2) is it wise to create the image when instiating the canvas class?( initially created the image using a separate thread)-when sould the image be created?
3)how to let the application know when to use the image when painting the display area?
I am just trying the logistics here. It is very crucial to me to understand the bolts of this as the core f my project fouses on the man machine interface development.(For the project, the cilent application is quering for the map using HTTP)
I use a png file of size 161 bytes. Is that too big for testing purposes.
I would all the help that I can get. thanks in advance1) when is the paint method precisely called by the system?after a reference to the canvas class is created?
After the canvas is set as the current display, and after that, after the repaint() is called.
2) is it wise to create the image when instiating the canvas class?( initially created the image using a separate thread)-when sould the image be created?
It's better to create the image in the very begining of the program e.g. in the midlet initialization. You can call the created image as often as you like later on
3)how to let the application know when to use the image when painting the display area?
you have to tell it :))
you can use if-then, switch, or anything else
and you can use clipping too -
How to display a dynamic image file from url?
Hey,I want to display a dynamic image file from url in applet.For example,a jpg file which from one video camera server,store one frame pictur for ever.My java file looks like here:
//PlayJpg.java:
import java.awt.*;
import java.applet.*;
import java.net.*;
public class PlayJpg extends Applet implements Runnable {
public static void main(String args[]) {
Frame F=new Frame("My Applet/Application Window");
F.setSize(480, 240);
PlayJpg A = new PlayJpg();
F.add(A);
A.start(); // Web browser calls start() automatically
// A.init(); - we skip calling it this time
// because it contains only Applet specific tasks.
F.setVisible(true);
Thread count = null;
String urlStr = null;
int sleepTime = 0;
Image image = null;
// called only for an applet - unless called explicitely by an appliaction
public void init() {
sleepTime = Integer.parseInt(getParameter("refreshTime"));
urlStr = getParameter("jpgFile");
// called only for an applet - unless called explicitely by an appliaction
public void start() {
count=(new Thread(this));
count.start();
// called only for applet when the browser leaves the web page
public void stop() {
count=null;
public void paint(Graphics g) {
try{
URL location=new URL(urlStr);
image = getToolkit().getImage(location);
}catch (MalformedURLException mue) {
showStatus (mue.toString());
}catch(Exception e){
System.out.println("Sorry. System Caught Exception in paint().");
System.out.println("e.getMessage():" + e.getMessage());
System.out.println("e.toString():" + e.toString());
System.out.println("e.printStackTrace():" );
e.printStackTrace();
if (image!=null) g.drawImage(image,1,1,320,240,this);
// called each time the display needs to be repainted
public void run() {
while (count==Thread.currentThread()) {
try {
Thread.currentThread().sleep(sleepTime*1000);
} catch(Exception e) {}
repaint(); // forces update of the screen
// end of PlayJpg.java
My Html file looks like here:
<html>
<applet code="PlayJpg.class" width=320 height=240>
<param name=jpgFile value="http://Localhost/playjpg/snapshot0.jpg">
<param name=refreshTime value="1">
</applet>
</html>
I only get the first frame picture for ever by my html.But the jpg file is dynamic.
Why?
Can you help me?
Thanks.
JoeHi,
Add this line inside your run() method, right before your call to repaint():
if (image != null) {image.flush();}Hope this helps,
Kurt. -
Help with SWFObject2, problem with display of alternate image
I'm trying to use SWFObject2 dynamic publishing version to test the visitors browser for flash pluggin and the version.
I want to only show my flash image if the browser finds the flash plug in and it supports the correct version of flash for my banner, otherwise I want to display a jpeg image in its place.
When flash support is available in my browser the flash image is displayed, no problems. But when Javascript or flash plugin support is not available and my alternate image jpeg is displayed something wierd happens and i would appreciate any help on this:
The image is displayed but is pushed to the right of the screen and it seems to have a box behind the image, the edge of the box is only visable and changes colour on rollove like it wants to be clicked, obviously i cannot see what the box is because the image covers it. There is nothing wrong with my image, i put that in place first and tested it loaded ok before i added the SWFObject code and file.
My code is below:
<script type="text/javascript" src="Scripts/swfobject.js"></script>
<script type="text/javascript">
swfobject.embedSWF("advertise_banner.swf", "altContent", "468", "60", "6.0.0", "expressinstall.swf");
</script>
</head>
<body>
<div id="wrapAltContent">
<div id="altContent">
<a href="advertise_banner.php?ad=y">
<img src="Images/advertise_banner.jpg" alt="Image linking to information on advertising a banner ad on Choose Almeria" />
</a>
</div>
</div>
Looking forward to replies.Hi,
Is this your question still relevant? If yes, did you study already this for example?
http://code.google.com/p/swfobject/wiki/documentation
Hans-G. -
I'm editing a wedding that I shot for a family member, But when I play it the top of the image is cropped off in the veiwing window but it shows the whole image in the project strip. When I make a DVD with it transfer the whole image or will it be the chopped off image and how do I make sure it is the whole image ?
What version of iMovie are you using?
For 9.09..
If the image is not 720p, you might have to crop it to have freehand control over which bit gets cut off.
How to crop it...
In the project window hover your cursor over a section of the clip in the bottom right corner as seen below:
Click on the cog and open up Cropping,Ken Burns and Rotation.
Click on Crop and drag and set to where you want it to be cropped, then click Done. (Because mine isn't 720p, iMovie automatically makes it so I cannot include the black border. If you do not mind this click Allow Black.)
Glad if this helped! Please rate up. -
How to display a blob image in RTF template's Header.
Hi,
I want to display a blob image (logo company) in my RTF template,
my problem is how i can display this image in the template's Header.
I tried this
<?
<fo:instream-foreign-object content-type="image/jpeg" >
<xsl:value-of select=".//LOGO"/>
</fo:instream-foreign-object>
?>
but was unsuccessful
Thanks in advance.I tried this
<?
<fo:instream-foreign-object content-type="image/jpeg" >
<xsl:value-of select=".//LOGO"/>
</fo:instream-foreign-object>
?>
but was unsuccessful
sure
what is red elements ?
you template can be looks like
..... some data .....
( after all data )
<?template:footer_logo?>
<fo:instream-foreign-object content-type="image/jpeg" ><xsl:value-of select=".//LOGO"/></fo:instream-foreign-object> (as field )
<?end template?>
<?call-template:footer_logo?> ( in header/footer )
some remarks https://oralublog.wordpress.com/2014/10/04/bi-publisher-11g-footers-and-headers-in-rtf-template/
Maybe you are looking for
-
OS is whatever OS ships with current IPOD Touch I cannot understand why the APPLE engineers have designed this product so that it has SO MANY WIFI problems. This is supposed to be an easy-to-use product. We've had no problems connecting our new lap
-
Critical stock as positive qty in LL01
Hi Experts, could any of You pls help me to identify a reason for critical stock? There is positive qty in my certain storage type shown in LL01, even though the mterial qty is handled with TR - TI - material staging process based on requisition, usi
-
When I upgraded my Mac Pro to Lion a feature of my LaserJet P2035n went away. The feature was the ability to do manual double sided printing. The feature showed on the printer page but was always greyed out. I have noticed that a recent Mac OS softwa
-
.
-
I am trying to reset my security passwords because i have forgotten them. i have read other articles but i still can not seem to figure out how to change these passwords.