Trying to displaying image in screen.
Hi,
I'm new to this CLDC and MIDP coding. I'm working on this code right now, but I cannot seem to display a image in the screen. All I get is a blue background.
Can someone help me to make the image appear in the screen?
-I think it may have to do with the directories, but I am not sure. I have tried everything possible that I can think of.
Here's my code:
public class Character extends GameCanvas implements Runnable
private Image image;
private int xAxis_Image;
private int yAxis_Image;
public Character()
super(true);
public void gatherImageProperties()
try
image = Image.createImage("/example.gif");
}catch(IOException e)
System.out.println("e");
finally{
Thread thread = new Thread(this);
thread.start();
public void run()
Graphics graphics = getGraphics();
while(true)
gameScreenRefresh(getGraphics());
try{
Thread.currentThread().sleep(45);
}catch(Exception e)
System.out.println(e);
private void gameScreenRefresh(Graphics g)
g.setColor(23, 200, 230);
g.fillRect(0, 0, getWidth(), getHeight());
g.drawImage(image, xAxis_Image, yAxis_Image, Graphics.HCENTER | Graphics.VCENTER );
flushGraphics();
}Here's my midlet
public class my_Midlet extends MIDlet
Character character;
public my_Midlet()
public void startApp()
character = new Character();
Display display = Display.getDisplay(this);
character.gatherImageProperties();
display.setCurrent(character);
public void pauseApp()
public void destroyApp(boolean unconditional)
}
image = Image.createImage("C:\Documents and Settings\Owner\Desktop\Graphics\src\graphic_Core\example.gif");{color:#000080}See the documentation for javax.microedition.lcdui.Image.createImage(String name){color}
Creates an immutable image from decoded image data obtained from the named resource. The name parameter is a resource name as defined by Class.getResourceAsStream(name). The rules for resolving resource names are defined in the Application Resource Files section of the java.lang package documentation.
{color:#000080}Refer to the documentation for java.lang{color}
<h5>Application Resource Files</h5>
Application resource files are accessed using getResourceAsStream(String name) in java.lang.Class . In the MIDP specification, getResourceAsStream is used to allow resource files to be retrieved from the MIDlet Suite's JAR file.
Resource names refer to the contents of the MIDlet Suite JAR file. Absolute pathnames, beginning with "/" are fully qualified file names within the jar file.
Relative pathnames, not beginning with "/" are relative to the class upon which getResourceAsStream is called. Relative names are converted to absolute by prepending a "/" followed by the fully qualified package with "." characters converted to "/" and a separator of "/". The resulting string is reduced to canonical form by applying as many times as possible the following:
All occurences of "/./" are replaced with "/".
All occurences of "/segment/../" are replaced with "/" where segment does not contain "/".
The canonical resource name is the absolute pathname of the resource within the JAR.
In no case can the path extend outside the JAR file, and resources outside the JAR file MUST NOT be accessible. For example, using "../../" does NOT point outside the JAR file. If there are any remaining "." or ".." characters they are treated literally in locating the resource. No resource can exist with that name so null is returned from Class.getResourceAsStream. Also, devices MUST NOT allow classfiles to be read from the JAR file as resources, but all other files MUST be accessible.
{color:#000080}Place your image file in the jar, and use it from there.
db{color}
Similar Messages
-
"Invalid byte 1 of 1-byte UTF-8 sequence" exception trying to display image
Hi there!
Last night I updated my project to open the <wellcome-file>. So I put this in my web.xml file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID"
version="2.5">
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.jspx</param-value>
</context-param>
<welcome-file-list>
<welcome-file>faces/login.jspx</welcome-file>
</welcome-file-list>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
[...]Now when I type http://localhost:8080/myproject the login.jspx is opened as expected.
But after this change, exceptions started to shown when images from my template.jspx is loaded (?).
Here's a piece of my template.jspx:
<?xml version="1.0" encoding="ISO-8859-1"?>
<jsp:root
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:r="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j"
version="2.0">
<f:facet name="controls">
<h:panelGroup>
<h:graphicImage
value="../imagens/erro.png"
id="hidelink" />
</h:panelGroup>
</f:facet>
[...]And here is the exception:
SEVERE: Error Rendering View[/imagens/erro.png]
com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.
at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
[...]And, of course, the image is not displayed.
The images from pages that uses template.jspx works fine (even the same image that causes the exception).
Only images from my template.jspx and pages that I use with <ui:include> throws the exception.
My directory structure:
web
|___templates
|___imagens
|___pages
login.jspxI tried with ISO-8859-1 and UTF-8 as encoding and the problem is the same.
I need some help. Any help.
If any more info is needed, please just ask me.
Thank you in advace!
I'm using:
JSF 1.2; Facelets 1.1.14; Richfaces 3.3; Tomcat 6, Java 6
YoshimitI got the same error. It was because my application's .java files were saved as UTF-8 but the .xhtml files were saved as cp1255 encoding. I have also added a filter to set the charset to each response like described [here |http://www.coderanch.com/t/211549/JSF/java/JSF-Character-Sets-UTF-mainly] .
PS: I had another error after that which was caused by copying the Richfaces xmlns definitions from a PDf provided by Refcardz. The " symbol turend to something that the SAX parser could not process.
Hope this helps.
Pavel Myshkin -
Dear gurus
I have to Picture Container in my Screen
and i want to display pictures on them.
Im facing a problem on that
when i execute the program i get the same picture on the other container.
how to resolve it?Container name are different..
CALL METHOD cl_gui_cfw=>flush. "First Container Coding.
CREATE OBJECT:
container EXPORTING container_name = 'PICTURE_CONTAINER',
picture EXPORTING parent = container.
CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
EXPORTING
p_object = 'GRAPHICS'
p_name = 'Snak TpF Logo'
p_id = 'BMAP'
p_btype = 'BCOL'
RECEIVING
p_bmp = l_graphic_xstr
EXCEPTIONS
NOT_FOUND = 1
INTERNAL_ERROR = 2
others = 3
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
graphic_size = XSTRLEN( l_graphic_xstr ).
l_graphic_conv = graphic_size.
l_graphic_offs = 0.
WHILE l_graphic_conv > 255.
graphic_table-line = l_graphic_xstr+l_graphic_offs(255).
APPEND graphic_table.
l_graphic_offs = l_graphic_offs + 255.
l_graphic_conv = l_graphic_conv - 255.
ENDWHILE.
graphic_table-line = l_graphic_xstr+l_graphic_offs(l_graphic_conv).
APPEND graphic_table.
CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
type = 'IMAGE'
subtype = 'X-UNKNOWN'
size = graphic_size
lifetime = 'T'
TABLES
data = graphic_table
CHANGING
url = url.
CALL METHOD picture->load_picture_from_url
EXPORTING
url = url.
CALL METHOD picture->set_display_mode
EXPORTING
display_mode = picture->display_mode_fit_center. -
Trying to display image in jscrollpane
Hi,
I am trying to get an image to display in a JScrollPane. The image is bigger than the allotted size so scrollbars are set to appear. The scrollbars appear and are scrollable but the image is not there. I know there have been other posts regarding this and I have tried the suggestions in those but nothing has worked. Here's a snipet of my code:
JLabel photo = new JLabel(new ImageIcon("/images/sbc.jpg"));
JPanel photoPanel = new JPanel();
JScrollPane photoScrollPane = new JScrollPane();
String filename = "images/sbc.jpg"
final URL url = View.class.getResource("/" + filename);
image = Toolkit.getDefaultToolkit().getImage(url);
photoPanel.add(photo);
photoPanel.setPreferredSize(new Dimension(imageWidth,imageHeight));
photoPanel.setVisible(true);
photoScrollPane.setPreferredSize(new Dimension(imageWidth,imageHeight));
//photoScrollPane.getViewport().add(photoPanel);
photoScrollPane.setViewportView(photoPanel);
photoScrollPane.setVisible(true);
this.setLeftComponent(photoScrollPane);
this.setVisible(true);
}this is a JSplitPane object and is inside a JFrame.
In this version of my code, I created the JScrollPane with the default constructor and not new JScrollPane(photoPanel); but it didn't make any difference.
I have also overridden the paintComponent method:
public void paintComponent(Graphics g) {
System.out.println("Entered View2.paintComponent()");
g.drawImage(image,0,0,this);
//g.drawImage(((ImageIcon)photo.getIcon()).getImage(),0,0,this); - doesn't work
System.out.println("Exiting View2.paintComponent()");
}I think if i told this object to add photo(JLabel) or photoPanel(JPanel) instead, the top left corner of the image is displayed in the designated area with no scroll bars.
Thanks in advance!I'm guessing you don't need the leading "/" in the path name. If that doesn't fix your problem then read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/misc/icon.html]How to Use Icons for working examples.
-
IPhone 4 screen jumps around when displaying images.
Hi guys,
My iPhone 4 has randomly started behaving unusually when trying to display images. The problem is at it's worse when using the camera or trying to display photographs. The lighter the image, the worse the problem.
The display seems to shrink and stretch rapidly from the bottom of the display. I also begin to see what should be the top of the screen appearing at the bottom.
Any ideas what could cause it? The phone recently had a new screen fitted.
Thanks in advance!
SeanHere is a still of the screen... http://www.flickr.com/photos/43074185@N05/12239963166/
-
I tried to display gif image from oracle to jsp but nothing appear
i tried to display image from oracle DB to jsp directly without using file processing , and i used Servlet and jsp , Servlet to get image from DB and jsp to use <img> tag , when i Run Servlet code
the image appaer on Microsoft Photo Editor , and when i run jsp the image dose not appear on jsp page , so please anyone has an idea about this broblem ,send the soluation or any information to my e-mail [email protected] , and I'll thankful about your help.
the Servlet and jsp code are below .
thank for your help
Servlet:
import java.io.InputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.PrintWriter;
import java.io.IOException;
public class Servlet extends HttpServlet
public void init(ServletConfig config) throws ServletException
super.init(config);
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
response.setContentType("image/gif");
int id = Integer.parseInt(request.getParameter("no"));
// int id = 2 ; when Run Servlet .
ResultSet rs = null;
Connection Lcon = null;
String stmt = " select Image from ImageTable where lmage_id ="+id;
Statement sm = null;
String data1 ="";
try
Lcon = getConntcion();
sm = Lcon.createStatement();
rs = sm.executeQuery(stmt);
if(rs.next())
InputStream in = rs.getBinaryStream(1);
ServletOutputStream sout = response.getOutputStream();
int c;
while((c=in.read())!= -1)
sout.write(c);
in.close();
sout.flush();
sout.close()
}catch(Exception e)
System.out.println("error in selectValue the error is "+e);
finally
rs .close( );
sm .close( );
Lcon.close( );
public Connection getConntcion()
Connection con = null;
try{
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
con = DriverManager.getConnection(",,,,,,,, DB Info ,username and password ,,,,,,,,,,,");
}catch(Exception e)
System.out.println("error in connection the error is "+e);
return con;
Jsp code :
<%@ page contentType="text/html"%>
<html>
<head
</head>
<title> testing image </title>
<body>
<form>
<img src="servlet/Servlet?no=2">
</form>
</body>
</html>InputStream in = rs.getBinaryStream(1);
byte[] image= null;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] buffer = new byte[8192];
int bytesRead = 0;
while ((bytesRead = in.read(buffer, 0, 8192)) != -1)
baos.write(buffer, 0, bytesRead);
image= baos.toByteArray();
in.close();
ServletOutputStream sout = response.getOutputStream();
if (image != null)
sout.write(image);
sout.flush();
} -
Displaying Image on the Emulator
Hi all,
I was trying to display image on to the emulator on canvas,problem is the image is getting failed to load.my code is as follows,and where should i have the image in my filesystem to be displayed on the emulator and what path should i give,my OS is LINUX
try {
image = Image.createImage("/212.png");
} catch (IOException ex) {
g.setColor(0xffffff);
g.drawString("Failed to load image!", 0, 0, Graphics.TOP | Graphics.LEFT);
return;
when i try this it shows the exception:Failed to load image.
Please Help me :-(..in = this.getClass().getResourceAsStream("/212.png");You are attempting to access the file in the root "/" folder. Something like:
in = this.getClass().getResourceAsStream("212.png");or
in = this.getClass().getResourceAsStream("res/212.png");or
Image im = Image.createImage("212.png"); or
Image im = Image.createImage("res/212.png"); should work. -
Indesign CC does not display linked PDF image on screen
On Mac1 (10.6.8) When I imported a PDF file into Indesign CC 9.1 as a linked image - the image would come in as usual, however the image would not appear on my screen. Only a blank page box.
I can see the thumbnail image of the imported PDF in the links palette correctly.
However, on my page it appears as a blank box.
Selected Hi-res preview, and still it appears as a blank box.
I export to PDF, and the image is there as it should be on the exported PDF.
I tried the same image on Mac2 (10.8.3) with Indesign CC.
The imported image appears correctly on the page. (no blank box)
I saved that file and opened it on Mac1 that is having the problem displaying the image.
Mac1 again does not display the image, instead it is a blank box.
Tried the same image import in Cs6. No issue on either mac1 or mac2
What could be causing the imported PDF not to display on the page in Indesign CC?
Has anyone else come across this problem?Hi
Are you still facing the same issue ?
Please refer to these threads for steps that you can try :
Edge Animation not working properly
Edge Animate not working in Muse Browser Preview, But works in Edge Preview
http://tv.adobe.com/watch/learn-adobe-muse-cc/integrating-adobe-edge-animate-graphics/
Thanks,
Sanjit -
After upgrading my iPad will do nothing except refuse to take a charge display a black screen or a battery red line or the occasional apple logo. Have tried soft boot and hard boot and nothing!,!
Hello there, Victoria.
Great job on troubleshooting on your own. The following Knowledge Base article offers up some great steps to review and additional recomendations:
iPhone and iPod touch: Charging the battery
http://support.apple.com/kb/HT1476
Resolving issues
If your battery doesn't charge, or if your device shows a low-battery image, black screen, or "accessory not supported" alert, follow these steps.
Inspect the connector at the bottom of the phone:
Make sure that there are no bent pins in the connector.
Make sure that the connector is free from debris.
If there are bent pins or debris, please contact Apple Support.
Otherwise, continue troubleshooting.
Make sure that the outlet you're using works.
Make sure that the Apple USB cable and Apple USB power adapter work.
Plug the device in to power and let it charge until your device turns on. This could take between 10 and 30 minutes. If you don't have an Apple USB power adapter, try connecting to a computer's high-power USB 2.0 port (not a keyboard). The computer must be on.
If the device still exhibits an issue, try turning your device off and then on again while connected to power.
If the issue persists, please contact Apple Support.
Thanks for reaching out to Apple Support Communities.
Cheers,
Pedro. -
Hi everyone, I am a newbie for labview. I just wanna ask you about image display in labview. Now I can display one image in my front panel. I open the file path and display it. First thing I wanna do is that is it possible to display on monitor full screen not on front panel and second thing is that how can I display images in folder and display it about 2 seconds delay in between? Pls kindly help me.
Thanks millions.
Solved!
Go to Solution.Hi there,
-I don't know whether the image full display can be possible or not, Any reason why you are asking for such requirement?
-The other question about reading files in a folder and display for 2sec can be done like shown in image.
-I've attached vi in lv 12 if needed.
-Next time, please post your vision related queries in Machine vision Board.
Thanks
uday,
Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
Certified LabVIEW Associate Developer (CLAD) Using LV13
Attachments:
Image_read_folder.vi 43 KB -
How to display image and data in module pool screen?
Hi,
I want to display image and relevant data besides the image in module pool screen, I am using docking container to display the image.
Actually I am able to display image or data any one but not both.
one more thing I want to display multiple images and their data.
Please suggest some one if you have any idea.
Regards,
Dileep.You can try below way, I have used in report.
DATA: gc_docking TYPE REF TO cl_gui_docking_container, "#EC NEEDED "Docking Container
gc_split TYPE REF TO cl_gui_easy_splitter_container, "#EC NEEDED "Splitter
gc_top_container TYPE REF TO cl_gui_container, "#EC NEEDED "Top Container
gc_bottom_container TYPE REF TO cl_gui_container, "#EC NEEDED "Bottom Container
gc_document TYPE REF TO cl_dd_document, "#EC NEEDED "Document
gc_events TYPE REF TO lcl_event_class, "#EC NEEDED " Local Event Class
gc_grid TYPE REF TO cl_gui_alv_grid, "#EC NEEDED " ALV Class
" Creating Docking
CREATE OBJECT gc_docking
EXPORTING
ratio = c_95.
IF sy-subrc EQ 0.
* Splitting the Docking container
CREATE OBJECT gc_split
EXPORTING
parent = gc_docking
sash_position = c_10 "Position of Splitter Bar (in Percent)
with_border = c_1. "With Border = 1 Without Border = 0
ENDIF.
* Placing the containers in the splitter
gc_top_container = gc_split->top_left_container .
gc_bottom_container = gc_split->bottom_right_container .
* Creating Grid
CREATE OBJECT gc_grid
EXPORTING
i_parent = gc_bottom_container.
ELSE.
* Background job handling
CREATE OBJECT gc_grid
EXPORTING
i_parent = gc_docking.
ENDIF.
* Creating the document
CREATE OBJECT gc_document
EXPORTING
style = 'ALV_GRID'.
Regards,
Sameer -
Trying to display multipage tiff image getting error
Hi
I am trying to read multipage tiff image but dont know how
I tried to display single page tiff getting error
my code is
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Drawing;
using System.Drawing.Imaging;
namespace Documentviewer1
public partial class _Default : System.Web.UI.Page
//string filepath = "";
protected void Page_Load(object sender, EventArgs e)
//// filepath = "image\045237302.tif";
string appath = Server.MapPath("/image") + @"\";
string imagename = Request.QueryString["ImageFileName"];
string filename = appath + imagename;
Response.ContentType = "image/tiff";
new Bitmap(filename).Save(Response.OutputStream, ImageFormat.Tiff);
////System.Drawing.Image TheImg = new App.Files.TIF(Request.QueryString["FilePath"]).GetTiffImageThumb(System.Convert.ToInt16(Request.QueryString["Pg"]), System.Convert.ToInt16(Request.QueryString["Height"]),
System.Convert.ToInt16(Request.QueryString["Width"]));//getting error in thisline Parameter not valid
my aspx page is has
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeBehind="Default.aspx.cs" Inherits="Documentviewer1._Default" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<h2>
<img alt="" src ="image/045237302.tif" width="200" height="200"/>
</h2>
<p>
To learn more about ASP.NET visit <a href="http://www.asp.net" title="ASP.NET Website">www.asp.net</a>.
</p>
<p>
You can also find <a href="http://go.microsoft.com/fwlink/?LinkID=152368&clcid=0x409"
title="MSDN ASP.NET Docs">documentation on ASP.NET at MSDN</a>.
</p>
</asp:Content>
getting error as Parameter not valid.
Can anybody help me to display the image in the browser.
Thanks
Mary Abraham
Mary SunishHi MaryAbraham,
Since the issue regards ASP.NET and website deployment. I suggestion you post the question in the ASP.NET forums at
http://forums.asp.net/. It is appropriate and more experts will assist you.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to display image in selection-screen of a report
Dear all ,
i want to show my image from url or from desktop to the report selection-screen . i have searched sdn and found some code . after applying it i am not able to display image in the selection-screen although it is displaying the box in which the image should appear . here i am sending my code plz verify where is the mistake .
REPORT ZPIC2.
DATA: docking TYPE REF TO cl_gui_docking_container,
picture_control_1 TYPE REF TO cl_gui_picture,
url(256) TYPE c .
PARAMETERS: A(4) DEFAULT '4' .
PARAMETERS: B(4) DEFAULT '5' .
AT SELECTION-SCREEN OUTPUT.
PERFORM show_pic.
**& Form show_pic
FORM show_pic.
CREATE OBJECT picture_control_1 EXPORTING parent = docking.
CHECK sy-subrc = 0.
CALL METHOD picture_control_1->set_3d_border
EXPORTING
border = 5.
CALL METHOD picture_control_1->set_display_mode
EXPORTING
display_mode = cl_gui_picture=>display_mode_stretch.
CALL METHOD picture_control_1->set_position
EXPORTING
height = 100
left = 150
top = 58
width = 350.
CALL METHOD picture_control_1->load_picture_from_url
EXPORTING
url = 'C:\abc.jpg' .
endif .
IF sy-subrc NE 0.
ENDIF.
ENDFORM.
CORECT ANSWERS WILL BE HIGHLY APPRECIATED AND SURELY REWARED .
THANKS ,
AMIT RANJANHi,
Try this code. hope it will work.
DATA: DOCKING TYPE REF TO CL_GUI_DOCKING_CONTAINER,
PICTURE_CONTROL_1 TYPE REF TO CL_GUI_PICTURE,
URL(256) TYPE C,
PIC_DATA TYPE TABLE OF W3MIME WITH HEADER LINE,
PIC_SIZE TYPE I.
SELECTION-SCREEN BEGIN OF BLOCK B1.
PARAMETERS: A(4) DEFAULT '4' .
PARAMETERS: B(4) DEFAULT '5' .
SELECTION-SCREEN END OF BLOCK B1.
AT SELECTION-SCREEN OUTPUT.
PERFORM SHOW_PIC.
*& Form SHOW_PIC
FORM SHOW_PIC .
CREATE OBJECT PICTURE_CONTROL_1
EXPORTING PARENT = DOCKING.
CHECK SY-SUBRC = 0.
CALL METHOD PICTURE_CONTROL_1->SET_3D_BORDER
EXPORTING
BORDER = 5.
CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
EXPORTING
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_STRETCH.
CALL METHOD PICTURE_CONTROL_1->SET_POSITION
EXPORTING
HEIGHT = 200
LEFT = 100
TOP = 20
WIDTH = 400.
CHANGE POSITION AND SIZE ABOVE**************************
IF URL IS INITIAL.
CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
TYPE = 'image'
SUBTYPE = CNDP_SAP_TAB_UNKNOWN
SIZE = PIC_SIZE
LIFETIME = CNDP_LIFETIME_TRANSACTION
TABLES
DATA = PIC_DATA
CHANGING
URL = URL
EXCEPTIONS
OTHERS = 1.
ENDIF.
CALL METHOD PICTURE_CONTROL_1->LOAD_PICTURE_FROM_URL
EXPORTING
URL = 'file://D:\img.jpg'.
ENDFORM. " SHOW_PIC -
Hi Steve/anyone
I am trying to display the image upload and Display using the "Oracle Fusion Developer Guide" page 404 Working with Oracle Multimedia Types by Frank Nimphius and Lynn Munsinger. I tried to replicate the solution in a sample app. My upload works as said. But when i try to browse I dont see the image and i get the following error in the background. Please help. All the steps mentioned have been done
! Edit Images.jspx
<af:inputFile value="#{bindings.Image.inputValue}" simple="true"
id="if1">
<binding:convertOrdDomain bindingRef="#{bindings.Image}"/>
</af:inputFile>
2 Browse Images.jspx
<af:panelLabelAndMessage label="#{bindings.Image.hints.label}"
id="plam1">
<af:media contentType="#{bindings.Image.inputValue.media.mimeType}"
source="#{bindings.Image.inputValue.source}" id="m2"/>
</af:panelLabelAndMessage>
<af:outputText value="#{bindings.Image.inputValue.media.width}" id="ot3"/>
java.lang.NullPointerException
at oracle.ord.html.OrdPlayMediaServlet.renderContent(OrdPlayMediaServlet.java:386)
at oracle.ord.html.OrdPlayMediaServlet.deliver(OrdPlayMediaServlet.java:264)
at oracle.ord.html.OrdPlayMediaServlet.doGet(OrdPlayMediaServlet.java:205)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilError showing images using Servlet OrdPlayMediaServlet
-
cannot open the menu and cannot even turn it off, the white apple image is displayed on the screen. how can i get into the menu?
Hold down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple logo appears - ignore the red slider.
Maybe you are looking for
-
Is it possible to have a bot on a Mac?
I recently updated to lion, and I downloaded a torrent (the only torrent I ever downloaded), but I deleted it before it even finished downloading. Our internet has been turning off every few hours, but we just reset it and it's fine. Two weeks ago co
-
PDF reporting in Apex 3.0
Hi, the pdf printing is working pretty good, but what if I want an invoice in PDF Format. How can I put the report information in one xml-document? Is it possible to display Master-Detail information? By example: header: customer and order informatio
-
Hi all I am developing an application in Java whereby I have several JComponents on a JPanel that the user has defined (coordinates wise) using drag and drop. I would like to implement the ability to save the "workspace" (the contents of the JPanel a
-
hi, I have a class B that inherits from a class A. Now, in a class C, I have a following method : Class C public void foo( A ){ ..} if I query class C for a method "foo" that takes params of type B, it does not return the above defined method. Why is
-
Which encoding uses XI internally for plain text files
Hi, I want to read in (via file adapter) some plain texts of different character encoding and map them via a Java mapping file. My question is now, which encoding does the internally XI bytestream have? Does the XI file adapter convert it to UTF-8 or