Dynamic Image From Network Path

I am trying to setup dynamic student photos onto a report, we are lucky enough to know the photo filenames as they are the same as our student_id's so I setup in a formula:
Spot\Image_Bank\QLSPhotographs\Images\" + {Photo_List_By_Course;1.student_id} + ".jpg"
as the image path I also tried:
"I:\QLSPhotographs\Images\" + {Photo_List_By_Course;1.student_id} + ".jpg"
as I have it mapped as a local drive both these options worked fine on my local machine running the website up in Visual Studio 2008 rather than IIS. Upon taking the website to our web server I tried the report using the "
Spot\Image_Bank..." option (as it wouldn't have the mapped I drive). This did not however work.
Do I need to adjust the formula?
What user/security would it run under the folder has read permission for Network Service, All Staff (our group for staff), System, Domain Admins and various others. The website seems to run under Network Service as I had to apply write access to a folder before in the website.

Is your web application able to retrieve the files from that location, independent of whatever you're doing with Crystal Reports? If not, the Crystal engine won't be able to, either. Make sure that the application is impersonating your domain users properly, assuming those are the credentials you're using to access that shared drive.

Similar Messages

  • Load dynamically image from path

    Hi,
    I want load image from path with CR4E. I have a report with a field that contain the path of image and a empty PictureObject.
    I wanna put the image from the path in the picture image.
    That work when i have a section that is unique :
    I can obtain the path with this code
                        IField field = clientDoc.getDataDefinition().getResultFields()
                                  .findField(fieldObject.getDataSourceName(), FieldDisplayNameType.formulaName, java.util.Locale.getDefault());
                        RowsetMetaData rowSetMetaData = new RowsetMetaData();
                        rowSetMetaData.setDataFields(clientDoc.getDataDefinition().getResultFields());
                        RowsetCursor resultCursor = clientDoc.getRowsetController().createCursor(null, rowSetMetaData);
                        Value values = clientDoc.getRowsetController().browseFieldValues(field, -1);
    And i can view the image with this code
                        clientDoc.getReportDefController().getReportObjectController().remove(picture);
                        PictureObject boPictureObject = clientDoc.getReportDefController().getReportObjectController().importPicture(path, theSection, picture.getLeft(), picture.getTop());
                        boPictureObject.setWidth(picture.getWidth());          
                        boPictureObject.setWidth(picture.getHeight());
    But when the section is not unique, it is always the same image in all section.
    How then I to make? A resolution has t-il there ? (with crystal report 8 there was ISectionEvent for this)
    Thanks for your help!
    Edited by: hermannpencole on Mar 24, 2011 5:35 PM

    Hi fUjI_FX,
    <br/>
    This is a solution for report with a field that contain the path of image and a empty PictureObject. the filed for the path is under picture Object, then image hide this field. (in this example the field for the path get the path from database with field PATH or MARKET_PATH you can change it).
    - at first open the doc
    <pre>
          * Load.
          * @throws ReportSDKException the report sdk exception
          * @throws IOException Signals that an I/O exception has occurred.
         private void load() throws ReportSDKException, IOException {
              clientDoc = new ReportClientDocument();
              clientDoc.open(new File(report.getPath()).getAbsolutePath(), OpenReportOptions._openAsReadOnly);
              //..here change datasource if necessary
              clientDoc.getDatabaseController().logon(username, password);
    </pre>
    - After  assign parameters if necessary with with CRJavaHelper.addDiscreteParameterValue. If you want communicate with the user you must develop your own Dialog Box (i have it if you want).
    <br/><br/>
    - And finally search on the reportDoc if you have Field with image (field named PATH and MARKED PATH in this sample) and replace it with picture image : sample code
    <pre>
          * Process report.
          * @param reportClientDocument the report client document
          * @throws IOException Signals that an I/O exception has occurred.
         private void processReport(IReportClientDocument reportClientDocument) throws IOException {
              try {
                   if (reportClientDocument == null) {
                        return;
                   // Get the area collection of the report
                   Areas theAreaCollection =  reportClientDocument.getReportDefController().getReportDefinition().getAreas();
                   if (theAreaCollection == null) {
                        return;
                   // Iterates through the areas
                   int lNumberOfAreas = theAreaCollection.size();
                   for (int lArea = 0; lArea < lNumberOfAreas; lArea++) {
                        IArea anArea = theAreaCollection.getArea(lArea);
                        if (anArea != null) {
                             Sections theSectionCollection = anArea.getSections();
                             if (theSectionCollection != null) {
                                  // Iterates through the sections
                                  long lNumberOfSections = theSectionCollection.size();
                                  for (int lSection = 0; lSection < lNumberOfSections; lSection++) {
                                       ISection aSection = theSectionCollection.getSection(lSection);
                                       processSection(aSection);
              } catch (ReportSDKException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
          * Process section.
          * @param theSection the the section
          * @throws ReportSDKException the report sdk exception
          * @throws IOException Signals that an I/O exception has occurred.
         private void processSection(ISection theSection) throws ReportSDKException, IOException {
              if (theSection == null) {
                   return;
              //System.out.printf("----> ProcessSection2 %s\n", theSection.getName());
              ReportObjects theReportObjectCollection = theSection.getReportObjects();
              if (theReportObjectCollection == null) {
                   return;
              // Iterate through the section items
              int lNumberOfReportObjects = theReportObjectCollection.size();
              Values values = null;
              PictureObject picture = null;
              String formulaName = null;
              for (int lReportObject = 0; lReportObject < lNumberOfReportObjects; lReportObject++) {
                   IReportObject aReportObject = theReportObjectCollection.getReportObject(lReportObject);
                   if (isNotifiable(aReportObject)) {
                        FieldObject fieldObject = (FieldObject) aReportObject;
                        IField field = clientDoc.getDataDefinition().getResultFields()
                                  .findField(fieldObject.getDataSourceName(), FieldDisplayNameType.formulaName, java.util.Locale.getDefault());
                        RowsetMetaData rowSetMetaData = new RowsetMetaData();
                        rowSetMetaData.setDataFields(clientDoc.getDataDefinition().getResultFields());
                        RowsetCursor resultCursor = clientDoc.getRowsetController().createCursor(null, rowSetMetaData);
                        formulaName = field.getFormulaForm();
                        values = clientDoc.getRowsetController().browseFieldValues(field, -1);
                   if (aReportObject.getKind() != null && aReportObject.getKind().equals(ReportObjectKind.picture)) {
                        picture = (PictureObject) aReportObject;
              if (picture != null && formulaName != null) {
                   //Create blank image
                   int resolution = getResolution();
                   int width = (picture.getWidth() * resolution) / 1440;
                   int height = (picture.getHeight() * resolution) / 1440;     
                   String locationTemp = System.getProperty("java.io.tmpdir") + "imagegen.png";
                   File tempFile = new File(locationTemp);
                   tempFile.deleteOnExit();     
                   ImageUtils.createBlankImage(tempFile, width, height, resolution);
                   clientDoc.getReportDefController().getReportObjectController().remove(picture);
                   PictureObject boPictureObject = clientDoc.getReportDefController().getReportObjectController().importPicture(locationTemp, theSection, picture.getLeft(), picture.getTop());
                   boPictureObject.setWidth(picture.getWidth());               
                   boPictureObject.setWidth(picture.getHeight());     
                   if (values != null && !values.isEmpty()) {
                        //Create image in temp dir
                        for (int i=0; i < values.size(); i++) {                    
                             String locationString = (String) values.get(i).computeText().replaceAll("[\\\"\\']", "");                    
                             File fileToResize = new File(locationString);     
                             if (locationString.isEmpty()) {
                                  //Nothing blank image is already generated
                             } else if (!fileToResize.exists()) {
                                  locationTemp = System.getProperty("java.io.tmpdir") + "imagegen" + locationString.replaceAll("[:/\\\\\\. ]", "_") + ".png";
                                  tempFile = new File(locationTemp);
                                  tempFile.deleteOnExit();     
                                  ImageUtils.createImageNotFound(tempFile, width, height, resolution);
                             } else {
                                  locationTemp = System.getProperty("java.io.tmpdir") + "imagegen" + locationString.replaceAll("[:/\\\\\\. ]", "_") + ".png";
                                  tempFile = new File(locationTemp);
                                  tempFile.deleteOnExit();     
                                  ImageUtils.createResizedCopy(fileToResize, tempFile, width, height, resolution);
                        //Create dynamic picture
                        PictureObject boPictureObject2 = (PictureObject)boPictureObject.clone(true);
                        ConditionFormula c = new ConditionFormula();
                        c.setText( "\"" + System.getProperty("java.io.tmpdir") +
                                  "imagegen\" & replace(replace(replace(replace(replace(replace(replace(" + formulaName + ",\"\\\",\"_\"),\":\",\"_\"),\"\"\"\",\"\"),\" \",\"_\"),\"'\",\"\"),\"/\",\"_\"),\".\",\"_\") & \".png\"");
                        boPictureObject2.setGraphicLocationFormula(c);
                        boPictureObject2.setLeft(picture.getLeft());
                        boPictureObject2.setTop(picture.getTop());
                        boPictureObject2.setWidth(picture.getWidth());               
                        boPictureObject2.setHeight(picture.getHeight());     
                        clientDoc.getReportDefController().getReportObjectController().modify(boPictureObject, boPictureObject2);
          * Gets the resolution.
          * @return the resolution
         private int getResolution() {
         double dResolution = MIN_RESOLUTION;
              switch (printQuality) {
                   case PRINT_QUALITY_HIGH:   dResolution = MAX_RESOLUTION; break;
                   case PRINT_QUALITY_MEDIUM: dResolution = MIN_RESOLUTION + ((MAX_RESOLUTION - MIN_RESOLUTION) * .6);     break;
                   case PRINT_QUALITY_NORMAL: dResolution = MIN_RESOLUTION + ((MAX_RESOLUTION - MIN_RESOLUTION) * .3);     break;
                   case PRINT_QUALITY_DRAFT: dResolution = MIN_RESOLUTION;     break;
              return (int)dResolution;
          * Checks if is notifiable.
          * @param theObjectPtr the the object ptr
          * @return true, if is notifiable
          * @throws ReportSDKException the report sdk exception
          * @throws IOException Signals that an I/O exception has occurred.
         private boolean isNotifiable(IReportObject theObjectPtr) throws ReportSDKException, IOException {
              if (theObjectPtr == null) {
                   return false;
              //System.out.printf("----> IsNotifiable %s\n", theObjectPtr.getName());
              ReportObjectKind kind = theObjectPtr.getKind();
              if (kind.equals(ReportObjectKind.field)) {
                   // The report object is a database field, let's see if it is an olefield
                   return (isOLEField((FieldObject) theObjectPtr));
              } else if (kind.equals(ReportObjectKind.subreport)) {
                   // Don't plug imager, but examine the subreport for other image
                   ISubreportObject aSubreport = (ISubreportObject) theObjectPtr;
                   processReport(clientDoc.getSubreportController().getSubreport(aSubreport.getSubreportName()));
                   return false;
              } else {
                   // ignore all other kinds
                   return false;
          * Checks if is oLE field.
          * @param fieldObject the field object
          * @return true, if is oLE field
          * @throws ReportSDKException the report sdk exception
         private boolean isOLEField(final FieldObject fieldObject) throws ReportSDKException {
              IField field = clientDoc.getDataDefinition().getResultFields()
                        .findField(fieldObject.getDataSourceName(), FieldDisplayNameType.formulaName,
                                  java.util.Locale.getDefault());
              if (field == null) {
                   return false;
              //System.out.printf("----> IsOLEField %s\n", field.getName());
              return ((field.getName().equalsIgnoreCase(("PATH"))) || (field.getName().equalsIgnoreCase(("MARKER_PATH"))));
    </pre>
    Edited by: hermannpencole on May 25, 2011 3:50 PM

  • Display Image from Local path "c:\image.gif"

    Hi Experts,
    Is there anyway to display an image from local path i.e "c:\img.jpg".
    I need to display an image from the path in Dialog(Screen) programming.
    I need to do it using program not any other way...
    Can anyone suggest me a method please.
    Thanks
    Regards
    Naveen

    Hi Naveen,
    You'll have to create a custom control for this and perform coding like this:
    data piccon type ref to cl_gui_custom_container.
    data my_piccon type ref to cl_gui_container.
    data my_pic type ref to cl_gui_picture.
    data my_container type ref to cl_gui_container.
    * invoking the static attribute of the class.
    my_container = cl_gui_container=>default_screen.
    create object piccon
    exporting
    parent = my_piccon
    container_name = 'IMG_CON'
    * STYLE =
    * LIFETIME = lifetime_default
    repid = sy-repid
    dynnr = sy-dynnr
    * NO_AUTODEF_PROGID_DYNNR =
    exceptions
    cntl_error = 1
    cntl_system_error = 2
    create_error = 3
    lifetime_error = 4
    lifetime_dynpro_dynpro_link = 5
    others = 6
    if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    create object my_pic
    exporting
    * LIFETIME =
    * SHELLSTYLE =
    parent = piccon
    * NAME =
    exceptions
    error = 1
    others = 2
    if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    * Can be used to load the picture from the presentation server.
    call method my_pic->load_picture_from_url
    exporting
    url = 'file://D:mydataPicturesMisc_pics 1fw1.jpg'
    * IMPORTING
    * RESULT =
    exceptions
    error = 1
    others = 2
    if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.

  • How to insert a dynamic image from a database

    I've recently started using Dreamweaver CC to set up a Dynamic Website (PHP pages with a mySQL database).  With perseverance and by downloading the new depreciated Server Behaviors and Bindings Panels I've been more or less successful at accomplishing my tasks.  I'm still struggling with getting a image to display from mySQL server data base.  In the Pre CC revisions this was easy and well documented.  I've downloaded the DMXZone HTML5 Data Bindings extension.  I can almost get accomplish my dynamic image task, but the DMXZone HTML5 Data Bindings extension says I must now get the the "unfinished but working on" DMX Zone Database Extension in addition to the HTML5 Data Bindings Extension to select my data source from the database.
    I'm thinking about dumping Dreamweaver CC altogether and just installing CS6 until the path gets better paved.  Any other ideas?  Sample code?  Work around?  Thanks in advance

    KevinatCirris wrote:
    I've recently started using Dreamweaver CC to set up a Dynamic Website (PHP pages with a mySQL database).  With perseverance and by downloading the new depreciated Server Behaviors and Bindings Panels I've been more or less successful at accomplishing my tasks.  I'm still struggling with getting a image to display from mySQL server data base.  In the Pre CC revisions this was easy and well documented.  I've downloaded the DMXZone HTML5 Data Bindings extension.  I can almost get accomplish my dynamic image task, but the DMXZone HTML5 Data Bindings extension says I must now get the the "unfinished but working on" DMX Zone Database Extension in addition to the HTML5 Data Bindings Extension to select my data source from the database.
    I'm thinking about dumping Dreamweaver CC altogether and just installing CS6 until the path gets better paved.  Any other ideas?  Sample code?  Work around?  Thanks in advance
    Really you would do it like any other piece of information in your database.
    Store the actual images in a folder on your server and the image file name in the database - myImage.jpg
    Then echo it to the page following the convention of your other data which is being echoed onto the page:
    <img scr="images/<?php echo $row_rsRecordSetName['images']; ?> alt="" >
    ['images'] above being the name of the database field in which you stored the image name and $row_rsRecordSetName being the variable created by the recordset (yours will be different)

  • PSE 9 (Win7) Organizer won't "copy" when adding images from network

    First, bringing images into PSE 9 Organizer works as expected from cameras, memory cards, etc. The file is copied from the original source onto the drive with the catalog.
    But, I simply cannot get a file "copied" from its original location when bringing it into the PSE 9 catalog under Windows 7 (64-bit) if the source location is on another computer "seen" via Windows Homegroup network.
    I do the following from the Organizer:
    1) File-Get Photos and Videos-From Files and Folders
    2) I browse to the Homegroup folder that has the file, and highlight it. (By the way, it takes several attempts of moving the mouse over the file name before the preview appears and the file is actually selected.)
    3) At this point I would expect the "Copy Files on Import" option to be available, but it is greyed-out and not checkable.
    4) If I select Open or Get Media, the file does go into the Organizer, but the file location is still the Homegroup network drive. As soon as the source computer is off-line, the Organizer link is lost, and I can't use the file.
    Why is the "Copy Files on Import" option never available??
    Here's what it looks like:

    What I am trying to do is to use Organizer to centralize, on one hard drive, images from various other computers in my Windows 7 Homegroup that may or may not be on when I need the images. A thumbnail in the Organizer that points to an offline source is not terribly useful.
    My problem could be fixed, as well as the overall usefulness of Organizer improved, by the simple enabling of the copy option even when another harddrive or network drive is the source. In this way, both the "always-on" and "never-on" situations could be accommodated.
    My solution was to copy the files in question to an SD card, walk the card over to my main computer, and then bring them into the catalog (which actually copies the files to the hard drive, which was my objective in the first place).

  • How can I use wget, cron and Automator to periodically pull a dynamic image from a URL to local storage, and then update a Keynote slide with that image, automatically?

    How can I use wget, cron and Automator to periodically pull an image from a URL (which is dynamically updated - like a weather map, say - to local storage, and then update a Keynote slide with that image, automatically?

    Any particular reason for those specific technologies?  wget does not exist on a mac, although you can nstall it I guess.  OS X has curl installed which should do pretty much anything you want to do with wget.  cron is being replaced by launchd, although cron still exists on mountain lion.
    As far as I can tell from automator all the standard 'actions' to access keynote  available to it require keynote to be open and running, but does not provide a function to actually open it.  So I think you will have to write some applescript, as a minimum to open and quit keynote. I notice that the keynote actions are mostly circa 2005 an wonder if they would even work.
    Under utilities in automator 'actions' there is a capability to add applescripts as part of the workflow.
    Also, note that cron is being dprecated by Apple and replaced by launchd.  that said cron is stil on my mountain lion instalation.
    This entry at stackoverflow shows use of cron with curl to get web urls.  http://stackoverflow.com/questions/1683620/getting-started-with-cronjobs-on-a-ma c
    If I have any time I may try and get this to work as it is quite interesting and new to me.  But otherwise, good luck.

  • Images from web path won't show in Crystal Reports XI R2

    Hi, I have a problem with my Crystal Report XI R2. I am trying to get images from web as well as static google map using OLE object. After setting the Graphic Location. No images are shown. I am using Windows XP SP3.
    Also, I tried to create a simple report using same program and version installed in my Windows 7 Laptop. I inserted OLE object with graphic location from web like http://www.domain.com/image.jpg and it appears... same as with google static map with given latitude and longitude. And it works!
    Is there any problem with my windows XP machine? any video card issue or dot net version issue or firewall issue?
    Please help. Thanks

    To add to Don's reply. Fiddler is a great HTTP sniffing utility that should be able to tell you what is happening as far as the permissions, etc., etc.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Urgent: read pdfs from network path?

    Hi friends,
    I have a probem:
    When I try to read a pdf (which is in a local network path) my applicattion does it ok only if I've logged on windows as administrator user in my PC, but it doesn't work if I try to log with another user... Any idea?
    Can I solve this question modifying my forms application? (How??) or it's only a windows permissions problem?
    Thanks
    Jose

    I can think of two ways to set the permissions. One is with HOST and then a command-line tool to set the permissions. I think there was something like that in the NT/Windows Resource Kits. The other one would be to use ORA_FFI and call a DLL that can set the permissions for you.
    But in either ways, you're doing these modifications using the currently logged on user. If the problem is that this user doesn't have access to the file, he/she cannot set the security settings either. You would have to set the access permissions on creation of the file.
    But you not just set the default permission of the directory in such a way that any newly created file gets the correct permissions?
    One last resort would be to schedule a script through the "at" command at scheduled intervals under a 'superuser" that will set the correct permissions.

  • Error 1603 Installing Creative Cloud from Network Path

    I used the same method as I am going to describe below to install CS6 but I cannot do this with Creative Cloud.
    After I built a install Package for Adobe Creative cloud I copied it up to a network share that I use for several other remote installations including Adobe CS6.  I use Dell KACE to distribute my software and due to the large size of Creative Cloud and Creative Suite before it I do not want to copy the large install files directly to the appliance.
    The problem I am having is when I try to install from this network location just as I have with CS6 I get the following error:
    Installation operation failed
    Windows Installer installed the product. Product Name: Adobe_CC_NoAcrobat. Product Version: 1.2.0000. Product Language: 1033. Manufacturer: Adobe Systems Incorporated. Installation success or error status: 1603.
    Adobe_CC_NoAcrobat is what I named the package.
    My install commands look like this:
    start /wait \\SERVER\AdobeCC\Adobe_CC_NoAcrobat\Exceptions\ExceptionDeployer.exe --workflow=install --mode=pre
    start /wait msiexec.exe /i "\\SERVER\AdobeCC\Adobe_CC_NoAcrobat\Build\Adobe_CC_NoAcrobat.msi" /qn /L*v c:\Adobe.log
    start /wait \\SERVER\AdobeCC\Adobe_CC_NoAcrobat\Exceptions\ExceptionDeployer.exe --workflow=install --mode=post
    I added the Logging after it kept failing to see what was going on and I can paste the entire log file if need be but if I copy the folder with the package contents locally and run the same commands from the same elevated command prompt it installs fine.  Error 1603 usually points to some access rights issue but for the life of me I cannot determine what the issue is.  I have given full control to "Everyone", "SYSTEM" and all users to the network share and it is only the MSI that fails it seems.

    I have just run into this problem.  I have made two packages earlier in the year (one of Creative Cloud Design and Web and one with Creative Cloud Master Collection both being for x64) and they both worked flawlessly when deploying via Microsoft Deployment Toolkit (MDT).  However I just went to make a new package of Master Collection (only including the applications we actually use) and it is now completely broken (I deleted my Creative Cloud Design and Web package from MDT but still have my old Master Collection package and it still works).
    My older packages were created on Windows Server 2008 SP2 Enterprise 32bit and I have tried creating new packages on Windows Server 2012 R2 x64 and Windows Server 2003 SP2 Standard Edition 32bit and both give the same failure.  I thought it might have been something about building on a x64 OS this time compared to last time but as I still get the same error when I tried to build from the Windows Server 2003 so that does not appear to be the case so I am guessing something has broken in the Creative Cloud Packager.
    Has anyone tried going back to an older version of the Creative Cloud Packager?  The current version is 1.6.0 Build 48 so if I can find a download link I will try and give version 1.5.0 a shot.  Either way this needs to be fixed ASAP as it did work and I need a working deployment for the new Windows 8.1.1 Enterprise x64 image I am in the process of making.

  • Dynamic images from disk in AIR on Linux

    I have a relatively simple AIR application that pulls image
    paths from a database and then attempts to display that image by
    setting the src="" attribute of an <mx:Image /> tag. On my
    Windows development machine this all works swimmingly, however,
    when transferring the application to Linux, the images only display
    as the "broken image" icon, as though they can't be read from disk.
    I've definitely verified that the images are where they're
    supposed to be, and that the files are not corrupted. I've used
    .nativePath to avoid problems with the file system differences. To
    wit, here's the relevant code:
    private var resourceRootPath:String =
    File.userDirectory.nativePath;
    [Bindable] private var imgPath = resourceRootPath +
    File.separator + Object.graphic // where Object.graphic is the file
    name pulled from a DB, as a parameter of an object the app uses
    repeatedly. It exists as a string that represents the file name,
    such as "graphic.jpg"
    <mx:Image id="currentSlideDisplay" source="{imgPath}"
    />
    Does anyone have any idea what I might be doing wrong?
    EDIT: I forgot to mention, this is RedHat Fedora 6 I'm
    working with.

    I'd be suspicious of using nativePath since Image is
    expecting a URL. Should be easy to check anyway.

  • How to load images from different path

    Hi,
    i'm triying to load an image using the next code:
    String path="C:/images/tv_on.gif";
    java.net.URL imgURL =new java.net.URL(path);
    img=Toolkit.getDefaultToolkit().getImage(imgURL);
    but when it is compiled it returns MalformedURLException.
    the image is in my local directory so i've tryed to define
    path="file:///C:/images/tv_on.gif";
    becuase the port and the local host name aren't needed.
    Anyway it does not work.
    I don't know how to load an image that it is in a file in a different path from the mainclass path
    CAN ANYONE HELP ME?

    sorry to bother, similar like above, i tried many times on my computer to load a simple image in java application.. here's my code:
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import java.io.*;
    import java.net.*;
    import javax.swing.*;
    public class View extends JFrame {
         private URL imageURL;
         private File file;
         private Image sourceImage;
         private String name, title, message;
         private int width, height;
        public static void main(String[] args) {
            System.out.println( "Hello Eros!!!" );
            View img = new View();
        public View() {
             name = "D:/shared/inputpic.gif";
             file = new File( name );
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            try {
                imageURL = new URL("http://www.google.com.my/images/logo_sm.gif" );
            } catch (MalformedURLException e) {
            if ( file == null ) {
                sourceImage = Toolkit.getDefaultToolkit().getImage( name );
                System.out.println( file );
            } else {
                sourceImage = toolkit.getImage( imageURL );
                System.out.println( file );
            width = sourceImage.getWidth( this );
            height = sourceImage.getHeight( this );
            System.out.println( "Pixel = " + width + "x" + height );
            if ( width * height == 1 ) {
                title = "Greetings";  // Shown in title bar of dialog box.
                if ( file == null ) {
                    message = "Unable to load the file " + name;
                } else {
                    message = "Unable to load the link " + imageURL;
                JOptionPane.showMessageDialog(null, message, title, JOptionPane.INFORMATION_MESSAGE);
    }could anyone test this n give my the reason i couldnt even load the image

  • Download .jpg image from Network Analyzer 8722es to PC

    I Have an Agilent 8722ES network Analyzer and I need to get the image, to save it with the test report.
    I can get the data and put in in a graphic but I prefer to put the real image as the Network Analyzer diplay, inlcuding the Markers, real frequency, colors, settings, etc.
    the Network Analyzer is capable to save the image as .jpg using the integrated 3.5' disk drive, but I need to save in real time the result and the picture.
    Do any body has an aplication than can help me with this? I tried to find something over net and in the Programming manual , but I can't find any.
    Thank you for your help guys...

    Imontoya
    I took a look at the manual for the 8722ES and as you stated the only way to get a jpeg file is to save it to floppy.
    From here I can see two options
    1. Call Agilent support and see if there is a VISA command to save the image. If there is a VISA command we can call it from LabVIEW.
    2. Use the Instrument Driver to import the raw data and create your own display in LabVIEW that looks like you want. You can then you can take a screenshot and do whatever you want with it.

  • "Access Denied" opening PDF from network UNC path.

    Can't open pdf file from network path when opening from Adobe Reader any versions. Opening other files such as word, excel etc that is not opening in Adobe Reader works just fine.
    Steps to reproduce bug:
    Create a shared folder with three folder deep. \\Servername\SharedDrive\FolderLevel1\FolderLevel2\FolderLevel3\
    Give user explicit access to "FolderLevel3" with read and execute rights
    Enabled "Protected Mode at StartUp" on Adobe Reader X or XI
    Make sure there are some PDF files in FolderLevel3
    On the user windows session "do not map the share drive", open explorer to "\\Servername\SharedDrive\FolderLevel1\FolderLevel2\FolderLevel3\" directly.
    Double click the PDF files in the folder and it will be blocked with an error Access Denied.
    Turn off Protected Mode at StartUp and it load fine
    Map the location to a Drive Letter and it load fine
    Use Adobe Professional and it works fine
    Use Nuance PDF reader and it works fine
    Not the ideal solution but if we gave users access to read at "SharedDrive" folder, FolderLevel1 and FolderLevel2 then they are able to read the PDF file. We would rather NOT DO THIS. They are blocked from the lower level for a reason......
    Results:
    Expected results: If it works on PRO it should work on Reader...

    Hi Ayenoy,
    Please provide the following information:
    1) Adobe Reader version on your machine.
    2) OS you are using.
    3) Is your machine or the shared drive a part of any special file system like DFS etc.
    4) Is the user a normal admin/standard user or a special user with roaming profile and folder redirections?
    Thanks,
    Shakti K

  • Sharing/Caching (Dynamic) Images

    I find that the Flash Player does not cache dynamic images
    (even in the same session), so my question is, how would I share
    images across multiple image components such that I can build an
    asset provider of sorts to assit with caching images and other
    assets?
    I've tried a simplistic approach where in I assign the source
    of one image component to another but then the first image
    component goes blank and the image "transfers" to the second.
    Not sure if BitmapData will help with this either.
    Any help/direction is much appreciated.
    Thanks.
    Shiv.

    URL? Code?
    Nancy Gill
    Adobe Community Expert
    Author: Dreamweaver 8 e-book for the DMX Zone
    Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
    2003)
    Technical Editor: Dreamweaver CS3: The Missing Manual,
    DMX 2004: The Complete Reference, DMX 2004: A Beginner's
    Guide
    Mastering Macromedia Contribute
    Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
    Web Development
    "kidcobra" <[email protected]> wrote in
    message
    news:g2oqb0$bgq$[email protected]..
    > PHP, dynamic images from mysql dbase....diplay on local
    server, but will
    > only
    > display on web server if in the same level or folder as
    the php page.
    > Locally,
    > I have put the path to the images in the dbase in front
    of the URL of the
    > image, and all works fine.... but with that path in
    there and images not
    > in
    > same folder as page, no web server display. I know I'm
    missing the
    > obvious, but
    > need help if anyone has the simple answer . Thanks
    >

  • [Forum FAQ] How to display an image from Http response in Reporting Services?

    Question:
    There is a kind of scenario that users want to display an image which is from URL. In Reporting Services, if the URL points to an image file, we can directly display it by typing the URL in embedded image. However, some URLs are just sending Http requests
    to server side, then redirect to another position and the server will return the image. For these kind of URLs, Reporting Services can’t directly render the image from Http response.
    Answer:
    To achieve this goal, we can add custom code into the report. Pass the URL as argument into our custom function so that we can create HttpRequest and get the HttpResponse. Then we can use custom function to return the Bytes() from the HttpResponse and render
    it into an image in report.
    Ps: In Reporting Services, it only support drawing Bytes() array into image, so we need to have our custom function return Bytes array.
    Add the assembly and custom code into the report.
    Public shared Function GetImageFromByte(Byval URL as String) As byte() 
                    Dim photo as System.Drawing.Image 
             Dim Request As System.Net.HttpWebRequest 
           Dim Response As System.Net.HttpWebResponse 
                  Request = System.Net.WebRequest.Create(URL)         
                     Response = CType(Request.GetResponse, System.Net.WebResponse) 
                 If Request.HaveResponse Then  
                      If Response.StatusCode = Net.HttpStatusCode.OK Then                    
                           photo = System.Drawing.Image.FromStream(Response.GetResponseStream) 
                     End If 
                 End If 
                  Dim ms AS System.IO.MemoryStream = new System.IO.MemoryStream() 
                 photo.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg) 
                    Dim imagedata as byte()  
                    imagedata = ms.GetBuffer()  
                    return imagedata
    End Function
    Grant the permission for assemblies. 
    Go to: 
    C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\RSpreviewPolicy.config 
    C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\rssrvpolicy.config
    Give “FullTrust” for Report_Expressions_Default_Permissions.
    Insert an image into report. 
    Expression:
    =Code.GetImageFromByte("https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSrVwPoAtlcA2A3KaiAJi-XjS4icr1QUnKYr7uzpX3IL3g2GPisAQ")
    The Result looks below:
    Applies to:
    Reporting Services 2005
    Reporting Services 2008
    Reporting Services 2008 R2
    Reporting Services 2012
    Reporting Services 2014
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    >
    Hi, I'd like to display a dynamic image from the web inside a JLabel or any other swing component it could work in. I've been looking on the Swing tutorials and others forums, all I can have is that a JLabel can load an Icon object, defined by an image URL, but can this URL be like "http://xxxxx/image.jpg" somehow or can it only be a local image URL?>
    I do not know why you start talking about an image on the web then go on to show concerns about whether it will work for a 'local' URL.
    But perhaps this answer will cover the possibilities.
    So long as you can from an URL to the image, and the bytes are available for download (e.g. some web sites wrap a direct call to an image in HTML that embeds the image), the URL based icon constructors will successfully load it.
    It does not matter if that URL points to
    - a web site,
    - a local server ('localhost'),
    - an URL representation of a File on the local file system, or
    - it is inside a Jar file that is on the application's run-time classpath.
    How you go about forming a valid URL to a 'local resources' (or indeed what you regard as local resources) is another matter, depending on the form of the project, and how the resources are stored (see list above).
    Probably the main reason that examples use images at a hard coded URL on the net is that it makes an 'image example' self contained. As soon as we compile and run it, we can see the result. I have posted a few examples like that on these forums.
    Edit 1:
    BTW - Welcome to the Sun forums
    Edited by: AndrewThompson64 on Apr 21, 2009 12:15 PM

Maybe you are looking for

  • Web Upload Glitch

    Im looking for suggestions on troubleshooting the Upload process for placing Lightroom web photo galleries online. Ive done it successfully once but have been unable to duplicate that feat. Ive figured out how to do it manually by exporting to my FTP

  • Cannot inject entitymanagerfactory in a helper class..

    I want to cache a inject EnityManagerFactory and use it to create application managed entity manager when needed. I thought of writing a single ton class and to store entitymanagerfactory reference and use it as wrapper to EnityManagerFactory.So, tha

  • VPP bought software -- WHOSE appleID to install the software?

    We are setting up a VPP account (or at least attempting to...  The links in the VPP documentation lead to apple pages where VPP appleIDs are prohibited).  And we don't quite get how this works. -- we have set up an email in our domain especially for

  • Convert web page to PDF in Mozilla

    Is it possible to add a "Convert current web page to PDF" button to Mozilla Firefox in the same way as IE has one, and if so how?

  • Can any MacBook Air owners help with CS2 installation?

    I had the old Photoshop CS2 disk installed on a 2006 MacBookPro, which crashed before I could deactivate, etc. Bought a 2013 MacBook Air. Hooked it to a disk drive before learning that CS2 disks are obsolete. Contacted Adobe and was provided a downlo