Modify image data when loading from a url

in an applet i am loading an image from a url, using aproximately the following code:
public Image loadImage(Component c, URL url) {
URLConnection conn = url.openConnection( );
Object o = conn.getContent( );
if( o instanceof ImageProducer ) {
return c.createImage( ( ImageProducer ) o );
else { ..... }
this loads the image without the possibility of modifying the input data. does anyone know how i can manipulate the InputStream so that i can intercept the input data?
the idea is to transfer an encrypted image and decode it. it should not be possible to download the image from the url with eg. a web-browser.
thanx, daniel

URLConnection.getInputStream()with reading from URLConnection.getInputStream() i can't manipulate any data. it's not possible to read some bytes and "unread" modified bytes.

Similar Messages

  • Load from file:// url

    Hi,
    I'm trying to get a very simple OSMF example loading from a file:// URL.
    When I load from an absolute http:// url the video is loaded and displayed.
    When I try to load from a relative URL or an absolute file:// URL the video is not loaded and displayed and no request is made to load the video.
    I don't think it is a security sandbox issue as I'm running in a trusted folder and would expect an exception for a security sandbox issue.
    Executing netLoader.canHandleResource() returns true for each URL.
    Surely I'm missing something obvious but I would expect this to work without any extra effort.
    Maybe this is a known issue of I need to do something else to load from file:// URLs.
    The code is so simple it's hardly worth posting:
    public function load( url:String ):void
         var resource:URLResource = new URLResource( url );
         _netLoader = new NetLoader();
         trace("VideoPlayer::load()", _netLoader.canHandleResource( resource ) );
         var media:VideoElement = new VideoElement( resource, _netLoader );
         //display has already been instantiated and added to the display list
         _display.addMediaElement( media );
         _player = new MediaPlayer();
         _player.media = media;
    Any help with this would be much appreciated.

    You can use the IOErrorEvent.IO_ERROR listener and trace for debugging to see if your xml is being received.
    example...
    var pageData:XML;
    private function getInfo():void {
    var url:String = "urlTo.xml";
    var myXMLLoader:URLLoader = new URLLoader();
    myXMLLoader.addEventListener(Event.COMPLETE, onLoaded, false, 0, true);
    myXMLLoader.addEventListener(IOErrorEvent.IO_ERROR, errorXML, false, 0, true);
    myXMLLoader.load(new URLRequest(url));
    private function onLoaded(e:Event):void {
    pageData = new XML(e.target.data);
    pageData.ignoreWhitespace = true;
    //for testing in Flash
    trace("Data received: "+pageData);
    //for testing to device
    // example: textfieldOnStage.htmlText = pageData;
    //handle xml load error
    private function errorXML(e:Event):void {
    trace("XML Error:"+ e);
    // example: textfieldOnStage.htmlText = pageData;

  • Chinese characters scrambled when loading from DS to BW

    Hi, I've been pulling my hair out with this issue.
    I have a flat file containing Chinese text. When I load this in BW using 'FLATFILE' as a source system, it works fine. BW shows the correct Chinese characters.
    When I do the same load using BODI, I get funny characters.
    When I use BODI to load from one flat file into another flat file, the Chinese characters remain correct.
    What do I need to do to make sure I get the right Chinese characters in BW when loading from BODI?
    BODI is installed on Unix on Oracle 10.
    I run the jobs as batch processes.
    The dsconfig.txt has got:
    AL_Engine=<default>_<default>.<default>
    There are no locale settings in al_env.sh
    BW target is UTF-8 codepage.
    File codepage is BIG5-HKSCS
    BODI is set up as a Unicode system in SAP BW.
    When loading flat file to flat file, I get a message:
    DATAFLOW: The specified locale <eng_gb.iso-8859-1> has been coerced to <Unicode (UTF-16)
    because the datastore <TWIN_FF_CUSTOMER_LOCAL> obtains data in <BIG5-HKSCS> codepage.
    JOB: Initializing transcoder for datastore <TWIN_FF_CUSTOMER_LOCAL> to transcode between
    engine codepage<Unicode (UTF-16)>  and datastore codepage <BIG5-HKSCS>
    When loading to BW the messages are almost the same, but now the last step in UTF-16 to UTF-8.
    I read the wiki post which definitely helped me to understand the rationale behind code page, but now I ran out of ideas what else to check ( http://wiki.sdn.sap.com/wiki/display/BOBJ/Multiple+Codepages )
    Any help would be greatly appreciated.
    Jan.

    Hi all. Thanks for the Inputs. This is what I got when I clicked on the Details Tab of the Monitor....
    Error when transferring data; communication error when analyzing
    Diagnosis
    Data packages or InfoPackages are missing in BI but there were no apparent processing errors in the source system. It is therefore probable that there was an error in the data transfer.
    The analysis tried to read the ALE outbox of the source system. This lead to error .
    It is possible that there is no connection to the source system.
    Procedure
    Check the TRFC overview in the source system.
    Check the connection to the source system for errors and check the authorizations and profiles of the remote user in both the BI and source systems.
    Check th ALE outbox of the source system for IDocs that have not been updated.

  • Photos on my Mac show the wrong date when imported from a portable Hard Drive

    I’ve got loads of photos that I had imported from my old PC.Last night I decided to start going through them and trying to get them sorted  
    prior to importing into iphoto. I discovered that some of the pictures (in particular ones I have taken from my old Iphone) all had the same date and time
    assigned to them. When I checked the Exif details, it listed the correct camera etc, but the date created seems to have changed to the date I copied them to my portable hard drive.  
    I thought this was strange as when they were on my PC I thought they were correct. I booted my PC up and checked the portable hard drive on Windows. When viewed on my PC the pictures all have the correct time and date assigned to them. However when I plug the same portable hard drive into my Mac the same files show up as being created on a more recent date (say 20th Jan 2013).
    I’ve done a lot of research last night, although I can find no forum with this exact problem, I feel it must have something to do with compatibility. The portable hard drive is FAT32, and I am assuming that in order to ensure all of the photos information is transferred correctly in needs to be NTFS.
    The problem I have is how do I transfer my files again from my PC to an NTFS drive, whilst keeping all of the correct date and time information assigned to the photos. My understanding is that the 2 aren’t compatible.
    Has anyone ever had this problem? It mainly seems to be with photos I have extracted from my Iphone or edited in some form by rotating them.
    I have a 13" Macbook Pro Retina with OSX Mavericks installed.

    What you may want to do is archive as a Zipfile the photos and then transfer them to the Mac.     It is possible some of the metadata is being lost on the FAT32 formatting.    USB Flashdrive might work better than a FAT32 formatted hard drive, as I do know that most USB Flashdrives are formatted about the same as SD media cards, which manage to preserve the data when copied from camera to Mac.    My big question is, do you still have the photos on media cards?  You might just want to get a media card reader on your Mac, if the photos are not on SD cards, and transfer them over with the media card reader.
    I do believe Retina MacBook Pros all have SD card readers built-in.
    Note: I've asked this be moved to the MacBook Pro forum.  MacBook without the secondary name refers to the consumer notebook Apple stopped making in 2011.

  • Anyone Locked a generated SO by item/header when loading from ORDERS05?

    Has anyone managed to sucessfully locked a generated Sales Order when Loading from an IDOC of type ORDERS05?. I create a lock at the item level if necessary, but for some reason it zeroises the item Qty, almost as though there was no Schedule segment supplied, which there is.
    Anyone hit this same problem and overcome it?.
    Blue

    This is in reply to the first post. I don't know what happened after.
    Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission sun.arch.data.model read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
         at java.lang.System.getProperty(Unknown Source)
         at org.eclipse.swt.internal.Library.loadLibrary(Library.java:167)
         at org.eclipse.swt.internal.Library.loadLibrary(Library.java:151)
         at org.eclipse.swt.internal.C.<clinit>(C.java:21)
    If you read the above trace from bottom to top, it shows none of you classes, only classes from that Eclipse library, which seems to loadLibrary() a native DLL. In order to do this, it needs to call System.getProperty( "sun.arch.data.model" ). This call is not allowed from un unsigned applet. So I guess you need to sign the applet and this problem will go away. Many other problems may follow. Just read very very carefully all the related documentation, which I did not.

  • Aperture 3.2.4 macbookpro lion: image disappears after loading from any project; repairing everything on starting app doesn't fix it. Only restarting the computer works. Any help, please? ... in non-technical language please. Thanks

    aperture 3.2.4, macbookpro lion: image disappears after loading from any project; repairing everything on starting app doesn't fix it. Only restarting the computer works. Any help, please? ... in non-technical language please. Thanks

    “Hi Kirby, thanks a lot for your answer.
    I got one answer, from DMoore, saying:
    “Try Safe boot and then restart with only Aperture open.  Still doent work write back with more details like Ram, HD capacity/free space.  Are these thumbnails or Previews? Have you turned off building previews in AP preferances?
    Safe boot   http://support.apple.com/kb/HT1564
    Starting up into Safe Mode does several things:
    1  It forces a directory check of the startup volume.
    2  It loads only required kernel extensions (some of the items in /System/Library/Extensions).
    3  In Mac OS X v10.3.9 or earlier, Safe Mode runs only Apple-installed startup items (such items may be installed either in /Library/StartupItems or in /System/Library/StartupItems; these are different than user-selected account login items).
    4  It disables all fonts other than those in /System/Library/Fonts (Mac OS X v10.4 or later).
    5  It moves to the Trash all font caches normally stored in /Library/Caches/com.apple.ATS/(uid)/ , where (uid) is a user ID number such as 501 (Mac OS X v10.4 or later).
    6  It disables all startup items and login items (Mac OS X v10.4 or later).
    7  Mac OS X v10.5.6 or later: A Safe Boot deletes the dynamic loader shared cache at (/var/db/dyld/). A cache with issues may cause a blue screen on startup, particularly after a Software Update. Restarting normally recreates this cache.”
    As I don’t know much about the technical aspects of computers, I don’t really understand the first answer, and it sounds like following it might produce unwanted changes.
    But I understand your questions, so I’ll try to answer them;
    "loading from any Project" means that I encounter the problem when I’m using a project, possibly after/because I’ve left the Mac on overnight, and/or  I’ve made a lot of adjustments, and, once the problem is there, it happens in any other project which I open – the images load then disappear.
    I can see images in the Browser, so it only happens in the Viewer(s).
    I’m afraid I don’t understand what you mean by: “If you select "Photos" from near the top of the Library tab of the Inspector, does it show you all of your Images?”. I am a newcomer to Aperture, so I don’t know what some of the buttons are for yet, but when I want to look at and adjust my pictures, I import them, as referenced images, then Aperture creates a folder/project in the Library. When I click on that Project (when it’s working properly), all the images appear in the Browser or the Viewers  – without me needing to “select Photos from near the top of the Library tab of the Inspector”. I selected it and looked at all the items in the dropdown menu, but none of them seems to offer the option to ‘show all the images’. So I’m not sure how to answer your question except to say that – yes, I can see all the pictures in the Browser or the Viewers (when it’s working properly), but I don’t seem to need to use the Photos button to achieve this.
    Did Aperture work before?
    Yes it worked ok for a while, but I only purchased it on 24th May.
    If I understand correctly, the difference between thumbnail and preview is that the thumbnail is what I see when the “Loading” wheel is turning, and the disappearance of this wheel after a few seconds means that I am now looking at the preview (also, the thumbnail cannot be adjusted).
    So I think the problem occurs when the thumbnail has finished loading; the viewer going blank/grey might mean that it is not showing the preview.
    But I have not changed the default Preview settings in Aperture Preferences.
    My macbookpro details:
    2.7 Ghz Intel Core i7
    Memory: 8 Gb 1333 MHz DDR3
    Hard Drive capacity 499.25 GB
    Available 387.36 GB
    I have noticed another problem: I cannot apply the same rating to multiple images: following the instructions, I select a group of contiguous (or non- contiguous) images, choose a selection eg “5stars” using the keyboard, but the stars only appear in the last selected image – even though all the images are still showing as selected.”
    I hope this helps you to understand more.
    Thank you for trying to help me.
    Tony

  • Component Slider not working when loaded from another swf file

    I have a simple Flash application that uses a component Slider to increase or decrease the size of the text in a TextArea (ta). It works perfectly fine on its own, however, when I try to load the same swf file from another application, I get the following error...
    ReferenceError: Error #1069: Property fl.managers:IFocusManager::form not found
    on fl.managers.FocusManager and there is no default value.
    at fl.controls::Slider/thumbPressHandler()
    Code...
    import fl.events.*;
    import flash.text.TextFormat;
    ta.text = "Lorem ipsum dolor sit amet";
    var tf:TextFormat = new TextFormat();
    tf.color = 0xCCCCCC;
    tf.font = "Trebuchet MS";
    tf.size = 12;
    slider.addEventListener(SliderEvent.THUMB_DRAG, sliderChange);
    style();
    function style():void
        ta.setStyle("textFormat", tf);
    function sliderChange(e:SliderEvent):void
        tf.size = slider.value;
        ta.setStyle("textFormat", tf);
    Could the containing swf file that I'm loading the slider swf file in anyway effect the slider application? I don't quite understand why it works on its own, but not when loaded from another app.

    add a slider component to the main (loading) swf's library.

  • Can data be loaded from Cube to DSO

    Can data be loaded from Cube to DSO

    Hello,
    Yes,it can be loaded...all you need to do is the follow the same procedure of source and target as you do with the normal flow,...there is no different with cube as data source...you can even schedule delta from the cube to the DSO.
    Thanks
    Ajeet

  • Images are not loading from initial domain when using a cdn

    Hello, i have a wordpress website on which i set the w3 total cache plugin with a cdn, the cdn is MaxCDN and is configured to not serve images but only css & js & font files. Because i configured the cdn not to serve images, the images in css files have the src as absolute path, path which point to original website domain, something like this: background-image: url("http://www.originaldomain.com/images/back.jpg");, the css file is served from the cdn like this: http://cdn.originaldomain.com/css/style.css . So the problem is that firefox refuse to load the images referred in style.css file, images which probably appear to be in another domain. If i try to load the images directly in browser, using address bar, they are loading ok, but on loading from css file i got a http error 500 (acording to firebug). The same website is loading ok in other browsers: ie7/ie8/ie9, opera, safari and chrome. Can anyone help me to solve the issue?

    '''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * You can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''
    Thank you.

  • Using image data read out from a file

    Hi,
    Having used the GetBitmapFromFileEx(), GetBitmapInfoEx() to acquire the necessary image data (most of them is the .png format), then using the FileToArray() to put the image data in my own binary file, e.g., "mypicture.dat". My idea is that whenever need to use the image, I can read out it from mypicture.dat and then display it on a pcture control.  But when loading the image data to the memory, I have no idea to map the image data buffer to an image resource, which can let to acquire a bitmap ID.  Because from the  cvi's image processing function lists, it seems that must through such as  the GetBitmapFromFileEx(), GetBitmapFromFile() to acquire the image data buffer and the bitmap ID, then using SetCtrlBitmap() to diplay it. Is there any way to resolve the problem? Thanks.
    David 

    Well, to read and write raw data file informations from a PNG image you must adhere to this standard. As a source of informations you may take a look to this Wikipedia page and to the links in this page from the PNG Home site.
    So the problem is: does your application worth the effort to study this documentation?
    Edit: FYI part of this job has been already made in CVI by Guillaume Dargaud for his ReadSavePNG instrument driver. It's been a long time since I have used this instrument, as I/O operations on PNG files have been integrated into CVI since release 8 and support for JPEG files in release 7 or so. Nevertheless I saw functions in that instrument for accessing raw data in a PNG file so you may find them useful for your needs.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How to load master data hierarchy load from BI to BPC 7.5 NW

    Hi,
    I am testing master data hierarchy data upload from BI to BPC. However when i run master data hierarchy mport package, it's always displaying a warning message saying that  no records are returned from "Z_PFT_CTR" which is my info object name.
    My transformation is as below.
    0BUS_AREA=BUS_AREA
    0COMP_CODE=COMP_CODE
    0CO_AREA=CO_AREA
    0LOGSYS=LOGSYS
    0OBJ_CURR=OBJ_CURR
    0PROFIT_CTR=PROFIT_CTR
    0RESP_PERS=RESP_PERS
    0RESP_USER=RESP_USER
    Conversion is as below
    ID=ID_CONVERT.xls 
    PARENTH1=HARI.xls
    Hierarchy i have mapped in conversion file from Source Inforobject 1000PCDUMMY-1 to  BPC  PARENTH1 Destination.
    Any suggestions plz?

    Hi,
    Just follow the docs in "How Tou2026 Automate BPC 7.0, version for the NetWeaver Platform Master Data Loads from BW to BPC"
    where you will get detail step-by-step procedure to load data.
    Check the url:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00380440-010b-2c10-70a1-e0b431255827
    Before that you have to transport into BPC system the load to work fine.
    Thanks
    Debasisha

  • Data not loading from R/3 to BW

    Hello
    I am a new user in SAP BW, but i am quite familiar with it now. I am trying to load or extract data from the SAP r/3 system to the BW system. When i check the value of my extractor in rsa3 , i can see the records. But when i try to load into the cube in BW , it shows in my monitor " Not yet completed/warning"  and "0 from 0 records" . My status is yellow in my details tab(though "REquests" message is green) I am using BW 3.x. It remains like that for a day and then the status changes to red without the data being loaded.
    Can anyone help me out with this? I tried a lot of things, but still not able to find a solutions to this?

    Hello
    Well i know it doesnot even come to the PSA.. ! because I had tried that earlier, it still says the same.
    I had tried activating also again , but with no success
    The error message in the "Status" Tab is as follows
    Request still running
    Diagnosis
    No errors could be found. The current process has probably not finished yet.
    System response
    The ALE inbox of the SAP BW is identical to the ALE outbox of the source system
    and/or
    the maximum wait time for this request has not yet run out
    and/or
    the batch job in the source system has not yet ended.
    Current status
    No Idocs arrived from the source system.
    Error messages in the "details" tab is as follows.
    ->Overall Status:Missing Messages or Warning
       -->Requests (messages):Everything OK (green)
       -->Data Request Arranged(green)
       -->confirmed with :Ok (green)
    -> Extaction (messages)  missing messages
       -->Missing Messages: Request Received (yellow)
       -->Missing Messages: Number of sent records(yellow)
       -->Missing Messages:Selection completed(yellow)
    ->Transfer (IDocs and TRFC): Missing messages(yellow)
    ->Processing (DataPacket): no DAta(yelloW)
    These were the errors
    Hope this would help in finding a solution.
    Thanks and Regards,
    Justin

  • Problem during  Data Warehouse Loading (from staging table to Cube)

    Hi All,
    I have created a staging Module in owb to load my flat files to my staging tables.I have created an Warehouse module to load my staging tables to Dimension and Cube that I have created.
    My senario:
    I have a temp_table_transaction which had loaded my flat files to it .This table had loaded with 168,271,269 milion record as through this flat file.
    I have created a mapping in owb which loaded my temp_table_transaction which has join with other tables and some expression and convert function that these numbers fill to a new table called stg_tbl_transaction in my staging module.Running this mapping takes 3 hours and 45 minutes with this configue of my mapping:
    Default operation mode in running parameter of Mapp config=Set based
    My dimesion filled correctly but I have two problem when I want to transfer my staging table to my Cube:
    #1 Problem:
    i have created a cube is called transaction_cube with owb and it generated and deployed correctly.
    i have created a map to fill my cube with 168,271,268 milon recodes in staging table was called stg_tbl_transaction and deployed it to server (my cube map operating mode is set based)
    but after running this map it did not complete after 9 hour and I forced to cancel my running's map by kill its sessions .I want to know this time for loading this capacity of data is acceptable or for this capacity of data we should spend more time.Please let me know if anybody has any Issue.
    #2 Problem
    To test my map I have created a map with configure set based in operation modes and select my stg_tbl_transaction as source with 168,271,268 records in it and I have created another table to transfer and load my data in it.I wanted to test the time we should spend on this simple map but after 5 hours my data had not loaded in new table.I want to know where is my problem.Should I have set something in configue of map or anothe things.Please guide me about these problems.
    CONFIGURATION OF MY SERVER:
    i run owb on two socket xeon 5500 series with 192 GB ram and disks with RAID 10 Array
    Regards,
    Sahar

    For all of you
    It is possible to load from Infoset to Cube we did it, and it was ok.
    Data are really loaded from Infoset (Cube + master dat) to cube.
    When you create a transformation under a cube Infoset is proposed, and it works fine ....
    Now the process is no more operationnal and i don't understand why .....
    Load from infoset to cube is possible, i can send you screen shot if you want ....
    Christophe

  • Data Not loaded from  ap_invoice_lines_interface to the base table

    Hi ,
    Please I'm working on Interface which load invoices from Cobol system to oracle , anyway procedure is working on fine & all data is loaded to the interface as i'm inserting 4 attributes which is DFF on the invoice line level
    Now when i ran the import program all data is loaded to the base table except one of the attributes isnot loaded .
    will anyone tell me what is the reason or how can i trace that ..........
    Thanks In Advance

    Dear All ,,,,
    Please i got it's a matter of size of the attribute1 segment i increased it ,,,,,,,,,but now the issue that data is saved in the base table but not showing in the screen
    will you please help me in that
    Edited by: miro_feps on May 21, 2012 1:01 AM

  • Error when loading from ODS to Cube

    Hello Friends,
    I am having trouble loading data from ODS to Infocube in my 2004S system.When loading data i get this message
    07/03/2007     13:10:25     Data target 'ODSXYZ ' removed from list of loadable targets; not loadable.
    07/03/2007     13:28:42     Data target 'ODSXYZ ' is not active or is incorrect; no loading allowed     
    I checked for ODSXYZ in my data target but there is nothing by that name.Even the infopackage doesnt have it.What needs to be done.Please help.
    Thanks.

    Its a expected behavior. When you migrate ur DS, the infopacks associated with it, will grey out all the data targets that they were feeding before, that applies to any infopack you create even after the migration. You womt be able to delete it.
    Having said this, this shouldnt impact ur loads from ODS to Cube. As this shoudl be taken care of by ur DTP's rather than ur infopacks.
    A few questions:
    How are you loading ur cube?
    Did the data get thru fine to PSA with the infopack in question?
    How did you load ur DSO(assuming the load was successful)?
    Message was edited by:
            voodi

Maybe you are looking for