Resized and shrunk down image is distorted on ios/android

It should be something very simple that just dont know.  When i proprtionally resize large image and display it on my mobile apps (ios & android) the image is slightly distorted and some smaller texts are little hard to read, or just doesnt look good.. As3 on desktop doesnt show it, and seems like only on mobile apps it happens.  I am using remote jpeg images loaded as bitmap and changing the width and height, is there something i can do to make it resize more correctly?  Thanks

You could try applying smoothing to the image.
_urlRequest=new URLRequest("pathtofile");
_loader=new Loader;
_loader.load(_urlRequest);
_loader.addEventListener(IOErrorEvent.IO_ERROR, function(e:IOErrorEvent):void{ trace(e) });
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE,smooth);
private function smooth(e:Event) {
var bit:Bitmap = e.target.content;          
if (bit != null) {
   bit.smoothing = true;

Similar Messages

  • When I have resized and saved an image in Photoshop (CS, version 8.0 for Mac) using image size, why is it so large when I open it in preview or another image viewer? Has it actually saved according to the size I specified?

    When I have resized and saved an image in Photoshop (CS, version 8.0 for Mac) using image size, why is it so large when I open it in preview or another image viewer? Has it actually saved according to the size I specified?

    You want to view the image at the Print Size, which represents the size that shows in the Image>Resize Dialog.
    View>Print Size
    Since screen resolution is almost always lower that the print resolution (somewhere between 72 and 96 usually), images will always look bigger on the screen, unless you view them at print size.
    (apple Retina displays have a much higher resolution than normal screens, closer to the average print size resolution)
    more info:
    Photoshop Help | Image size and resolution

  • Save / Load Image on device storage (iOS & Android)

    Has anyone used application storage on iOS / Android ?
    I need to be able to take a photo with the device and save that photo to the application rather than the device camera roll. When my app is opened I need to read these images and load them.
    Any help with how to tackle this would be highly appreciated.
    Cheers!

    So I'm able to get the camera to take the photo or choose from library and get the image added to the stage.  Once I get the image added to the stage.. how do I save that image?     and then when my app is opened .. how do I check if that image exists and then load it up?
    Ideally ..  I would like to check if  1.png exists .. if it does.. add it to the stage in a predefined space. Hopefully that makes some sense
    function addToStage():void {
       trace("Image was added to Stage");
      imgLoader = new Loader();
      imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, drawBitmap);
      imgLoader.addEventListener(IOErrorEvent.IO_ERROR, errorHandlerIOErrorEventHandler);
      imgLoader.loadFilePromise(imagePromise);
    function drawBitmap(e:Event):void{
      if (image != null && contains(image)){
    mcHolder.mcImg.removeChild(image);
    myBitmapData = new BitmapData(600,600);
       image = new Bitmap(myBitmapData);
       image.bitmapData = Bitmap(e.currentTarget.content).bitmapData;
       trace("Original Image Width = " + image.width + " Height = " + image.height);
       trace("Bitmap was drawn");
      mcHolder.mcImg.addChild(image);
      createGestouch();

  • Resize and display large images at high frame rate.

    Hi,
    I am looking for some suggestions on how to implement fast image display.
    I have a device which creates 3000x3000 data arrays which I then convert into images. The device can output this data at anywhere from 5-50fps.
    For display these are then resized to about 500x500 pixels.
    The problem I have is that the resizing part of the process is quite slow and takes around 3/4 second .
    So does anyone have an suggestions on I can get the images to the screen at a reasonably quick rate ?
    I guess I need some sort of queue but has someone an example of how to do this ?
    Thanks,
    Paul

    Hi Rox,
    How are you verifying that you are loosing the frames during the saving and not during the acquisition? Are you able to determine where you are dropping frames? Is it at the beginning, the end or randomly? Thank you!
    Regards,
    Kira T

  • Scale and Crop with Image Alchemy

    Hello,
    We're using Digital Asset Managment with Image Alchemy for the conversion engine. Does anybody know how to configure a rendition set that scales and crops an image without distortion? So if you check-in a 1000x1500 pixel jpeg, it could scale it down and crop it to exactly 100x100 pixels.
    I've been looking through the Image Alchemy documentation, but haven't found this example yet.
    Thanks
    -Jason

    All you need to do is define an "ImageAlchemy" variable inside the "ImageManager_NameValues" ResultSet, DAM automatically knows when to use it for the rendition info. But instead of pointing to the ImageAlchemy executable file, I point to my script. For my conversion ResultSet's extEngine, I refer to an "ImageMagick" variable instead.

  • Green screen filter and scaling down distorts image?

    I captured footage from Digital Video Camcorder NTSC ZR30 MC (standard definition camera 2001?) through firewire connection. Footage was recorded in 12 bit rate. Captured in equivalent DV NTSC 32 kHz. Edited the footage using green screen, scaled down to about a quarter of the frame and used oval shape video generator.
    Using FCP 0.6. After rendering all edited footage, it plays back digitally distorted (digital lines constructing the image are out of sync). When exported through Quick Time Movie the image remains distorted.
    What can be the cause of that?
    Please help,
    Hazel

    When you slow down footage you are creating frames where there were none before.  I'd suggest you do this in a two step process:
    1. Slow down your footage and render it.  export selfcontained movie, do not recompress all frames.
    2. re-import the slowed down footage and apply green screen filter.

  • I installed Yosemite and now my computer is slow when logging in. Also when I type my password the screen images are distorted. After that my home screen appears and everything seems normal. What can I do to fix this?

    I installed Yosemite and now my computer is slow when logging in. Also when I type my password, a bar appears measuring the process and then all of a sudden the screen images are distorted. After that my home screen appears and everything seems normal. What can I do to fix this?
    Here is what the etrecheck results are:
    Problem description:
    slow at start up, screen is distorted while logging in, it is fine after
    EtreCheck version: 2.1.8 (121)
    Report generated April 5, 2015 at 9:42:01 AM PDT
    Download EtreCheck from http://etresoft.com/etrecheck
    Click the [Click for support] links for help with non-Apple products.
    Click the [Click for details] links for more information about that line.
    Hardware Information: ℹ️
        MacBook Pro (13-inch, Early 2011) (Technical Specifications)
        MacBook Pro - model: MacBookPro8,1
        1 2.3 GHz Intel Core i5 CPU: 2-core
        4 GB RAM Upgradeable
            BANK 0/DIMM0
                2 GB DDR3 1333 MHz ok
            BANK 1/DIMM0
                2 GB DDR3 1333 MHz ok
        Bluetooth: Old - Handoff/Airdrop2 not supported
        Wireless:  en1: 802.11 a/b/g/n
        Battery Health: Normal - Cycle count 297
    Video Information: ℹ️
        Intel HD Graphics 3000 - VRAM: 384 MB
            Color LCD 1280 x 800
    System Software: ℹ️
        OS X 10.10.2 (14C109) - Time since boot: 0:7:0
    Disk Information: ℹ️
        Hitachi HTS545032B9A302 disk0 : (320.07 GB)
            EFI (disk0s1) <not mounted> : 210 MB
            Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
            Macintosh HD (disk1) / : 318.84 GB (174.85 GB free)
                Encrypted AES-XTS Unlocked
                Core Storage: disk0s2 319.21 GB Online
        MATSHITADVD-R   UJ-898
    USB Information: ℹ️
        Apple Inc. Apple Internal Keyboard / Trackpad
        Apple Inc. BRCM2070 Hub
            Apple Inc. Bluetooth USB Host Controller
        Apple Inc. FaceTime HD Camera (Built-in)
        Apple Computer, Inc. IR Receiver
    Thunderbolt Information: ℹ️
        Apple Inc. thunderbolt_bus
    Gatekeeper: ℹ️
        Mac App Store and identified developers
    Kernel Extensions: ℹ️
            /System/Library/Extensions
        [not loaded]    com.devguru.driver.SamsungComposite (1.1.0) [Click for support]
        [not loaded]    com.logmein.driver.LogMeInSoundDriver (1.0.3 - SDK 10.5) [Click for support]
            /System/Library/Extensions/ssuddrv.kext/Contents/PlugIns
        [not loaded]    com.devguru.driver.SamsungACMControl (1.1.0) [Click for support]
        [not loaded]    com.devguru.driver.SamsungACMData (1.1.0) [Click for support]
    Startup Items: ℹ️
        HP Trap Monitor: Path: /Library/StartupItems/HP Trap Monitor
        Startup items are obsolete in OS X Yosemite
    Problem System Launch Daemons: ℹ️
        [failed]    com.apple.ucupdate.plist
        [failed]    com.apple.watchdogd.plist [Click for details]
    Launch Agents: ℹ️
        [not loaded]    com.google.keystone.agent.plist [Click for support]
        [not loaded]    com.hp.help.tocgenerator.plist [Click for support]
        [not loaded]    com.logmein.LMILaunchAgentFixer.plist [Click for support]
        [not loaded]    com.logmein.logmeingui.plist [Click for support]
        [not loaded]    com.logmein.logmeinguiagent.plist [Click for support]
        [not loaded]    com.logmein.logmeinguiagentatlogin.plist [Click for support]
    Launch Daemons: ℹ️
        [not loaded]    com.adobe.fpsaud.plist [Click for support]
        [not loaded]    com.google.keystone.daemon.plist [Click for support]
        [not loaded]    com.logmein.logmeinblanker.plist [Click for support]
        [not loaded]    com.logmein.logmeinserver.plist [Click for support]
        [not loaded]    com.logmein.raupdate.plist [Click for support]
        [not loaded]    com.microsoft.office.licensing.helper.plist [Click for support]
    User Launch Agents: ℹ️
        [not loaded]    com.adobe.ARM.[...].plist [Click for support]
        [not loaded]    com.facebook.videochat.[redacted].plist [Click for support]
        [not loaded]    com.google.GoogleContactSyncAgent.plist [Click for support]
    User Login Items: ℹ️
        iTunesHelper    UNKNOWN Hidden (missing value)
        AdobeResourceSynchronizer    Application Hidden (/Applications/Adobe Reader.app/Contents/Support/AdobeResourceSynchronizer.app)
        Android File Transfer Agent    Application  (/Users/[redacted]/Library/Application Support/Google/Android File Transfer/Android File Transfer Agent.app)
        HP Product Research    Application  (/Library/Application Support/Hewlett-Packard/Customer Participation/HP Product Research.app)
        HPEventHandler    Application  (/Library/Printers/hp/hpio/HPEventHandler.app)
    Internet Plug-ins: ℹ️
        o1dbrowserplugin: Version: 5.40.2.0 - SDK 10.8 [Click for support]
        LogMeInSafari64: Version: 1.0.660 [Click for support]
        Default Browser: Version: 600 - SDK 10.10
        Silverlight: Version: 5.1.10411.0 - SDK 10.6 [Click for support]
        FlashPlayer-10.6: Version: 17.0.0.134 - SDK 10.6 [Click for support]
        LogMeIn: Version: 1.0.660 [Click for support]
        Flash Player: Version: 17.0.0.134 - SDK 10.6 [Click for support]
        LogMeInSafari32: Version: 1.0.660 [Click for support]
        QuickTime Plugin: Version: 7.7.3
        googletalkbrowserplugin: Version: 5.40.2.0 - SDK 10.8 [Click for support]
        AdobePDFViewer: Version: 10.0.1 [Click for support]
        SharePointBrowserPlugin: Version: 14.1.0 [Click for support]
        iPhotoPhotocast: Version: 7.0 - SDK 10.7
    3rd Party Preference Panes: ℹ️
        Flash Player  [Click for support]
    Time Machine: ℹ️
        Time Machine not configured!
    Top Processes by CPU: ℹ️
             7%    ocspd
             4%    WindowServer
             1%    kextd
             0%    ps
             0%    securityd
    Top Processes by Memory: ℹ️
        137 MB    Microsoft Word
        120 MB    Safari
        86 MB    ocspd
        82 MB    CalendarAgent
        77 MB    WindowServer
    Virtual Memory Information: ℹ️
        310 MB    Free RAM
        1.89 GB    Active RAM
        1.55 GB    Inactive RAM
        544 MB    Wired RAM
        1.13 GB    Page-ins
        8 KB    Page-outs
    Diagnostics Information: ℹ️
        Apr 5, 2015, 09:32:47 AM    Self test - passed
        Apr 5, 2015, 09:30:05 AM    /Users/[redacted]/Library/Logs/DiagnosticReports/AdobeResourceSynchronizer_2015 -04-05-093005_[redacted].crash
        Apr 4, 2015, 01:12:41 PM    /Users/[redacted]/Library/Logs/DiagnosticReports/AdobeResourceSynchronizer_2015 -04-04-131241_[redacted].crash
        Apr 4, 2015, 08:13:57 AM    /Users/[redacted]/Library/Logs/DiagnosticReports/AdobeResourceSynchronizer_2015 -04-04-081357_[redacted].crash

    Reinstalling OS X Without Erasing the Drive
    Boot to the Recovery HD: Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Reinstalling OS X Without Erasing the Drive
    Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the main menu. Repair the Hard Drive and Permissions as follows.
    When the recovery menu appears select Disk Utility and press the Continue button. After Disk Utility loads select the Macintosh HD entry from the the left side list.  Click on the First Aid tab, then click on the Repair Disk button. If Disk Utility reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit Disk Utility and return to the main menu.
    Reinstall OS X: Select Reinstall OS X and click on the Continue button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.
    Alternatively, see:
    Reinstall OS X Without Erasing the Drive
    Choose the version you have installed now:
    OS X Yosemite- Reinstall OS X
    OS X Mavericks- Reinstall OS X
    OS X Mountain Lion- Reinstall OS X
    OS X Lion- Reinstall Mac OS X
         Note: You will need an active Internet connection. I suggest using Ethernet
                     if possible because it is three times faster than wireless.

  • I downloaded a vector file from Shutterstock. How do I edit the text in Photoshop? If i enlarge the image- the pixels are awful and the image is distorted.

    i downloaded a vector file from Shutterstock. How do I edit the text in Photoshop? If i enlarge the image- the pixels are awful and the image is distorted.

    jessicae28493569 wrote:
    i downloaded a vector file from Shutterstock. How do I edit the text in Photoshop? If i enlarge the image- the pixels are awful and the image is distorted.
    What is the file format of the vector you downloaded?  Custom Shapes have a .PSP extension, and are placed according to this table.
    Preference filenames and locations in Photoshop CC
    They will then be loadable from the Custom Shapes drop down — click on the cog icon > Load shape > Find your downloaded vector.
    Once placed in the image, it will appear as a Shape layer, and can be edited with the Path, and Direct Selection tools (black and white arrows on the toolbar)

  • My iPad fell off the bed. Now when I turn it on there is a red backlight and then the images come on, but they are not like before. The picture colors are distorted. Can this problem be rectified?

    Having problems with my iPad after it fell of the bed. When I turn it on there is a red backlight, then the screen comes on. Even then the page does not look right. Images are distorted and there are patches of red in the images. What does this mean? Can the problem be rectified?

    I would take it to the Apple store but some people have been having luck holding their iPad upside down and smacking it on it's back. Be careful, good luck.

  • Resizing and positioning a stage with a background image

    Hey guys,
    I'm trying to get some specific behaviour on a stage as I think it'll work out best for the application I am doing. The module I am working on right now consists of a stage with an imageview bound to the width and height and an image inside. I'm eventually looking to setup some animations and such which will overlay on the image but I want the window to be resizable in various ways.
    Right now, when the stage is created I manually set the width and height so the image fits perfectly in the stage. For resizing, I want the user to be able to drag either the height or width or diagonal sliders but have the original aspect ratio of the stage retained. I have the preserveRatio variable set to true in the ImageView which makes the image not become distorted, but the stage can be extended horizontally/vertically/diagonally to any ratio which I'd rather not have. In terms of fullscreening, I'd like to allow it and have the image centred.
    I've tried to see if the LayoutInfo class can help me out, but it doesn't seem to have any implementations which are too useful for what I am trying to do. So does anyone know how I can accomplish the above? I'm very new to JavaFX so if anyone can make any other suggestions in terms of the objects I am using and what's best practices for what I am trying to do, it would be much appreciated. I've looked into using PathAnimation and PathTransition for the animations I am using and while they'd do most of the job well, I need to be able to place objects, modify speeds, locations etc. so I'll probably just end up making some custom drawing methods.
    Thanks in advance,

    Similar request in [JavaFX rezising-scaling scene & elements|http://forums.sun.com/thread.jspa?threadID=5437642]...
    Mmm, I made various experiments. The difficulty is to watch both dimensions, because when one change, the other must be changed as well, but the watch is then triggered, making a cascade of changes... I solved it (partly) with a boolean disabling the secondary change.
    def image = Image
        url: "file:///D:/images/forest_0003_1024.jpg";
        preserveRatio: true
    def startSize = image.width / 3;
    var bResizingWidth: Boolean;
    var bResizingHeight: Boolean;
    var stw = bind scene.width on replace
    println("Width -> {stw}");
        ResizeStage(true);
    var sth = bind scene.height on replace
    println("Height -> {sth}");
        ResizeStage(false);
    var scene: Scene;
    var iv: ImageView;
    def stage = Stage
        title: "Proportional Stage"
        scene: scene = Scene
            content: iv = ImageView
                image: image
                preserveRatio: true
                fitWidth: startSize
    def frames: java.awt.Frame[] = java.awt.Frame.getFrames();
    //~ println(frames[0]);
    def insets = frames[0].getInsets();
    //~ println("T={insets.top} L={insets.left} B={insets.bottom} R={insets.right} ");
    def insetX = insets.left + insets.right;
    def insetY = insets.top + insets.bottom;
    function ResizeStage(bIsWidth: Boolean): Void
        if (stage.width == 0) return; // Init, nothing to do
        if (bResizingHeight and bIsWidth) // One dim is changed, don't react on setting of other dim
            bResizingHeight = false;
            return; // Just ignore secondary change
        if (bResizingWidth and not bIsWidth) // Idem
            bResizingWidth = false;
            return; // Just ignore secondary change
        if (bIsWidth)
            bResizingWidth = true;
        else
            bResizingHeight = true;
        println("Stage: {stage.width} x {stage.height}");
        def ratio = image.width / image.height;
        if (bIsWidth)
            stage.height = scene.width / ratio + insetY;
            println("H {scene.width} -> {stage.height}");
        else
            stage.width = scene.height * ratio + insetX;
            println("W {scene.height} -> {stage.width}");
        iv.fitWidth = scene.width;
    }There are still some glitches, but it roughly works...
    [EDIT] Changed to avoid resizing the dimension that the user is changing. Result is more logical but slightly worse... (?)
    Edited by: PhiLho on 29 mai 2010 13:24

  • How to scale up and scale down a image in java

    i have a problem i want to scale the any image in java
    i mean that what i have to do actually when i scale up the image and scale down the image
    plz reply as soon as possible
    mail me at following address
    [email protected]
    [email protected]
    [email protected]

    Look at Image.getScaledImage(...)

  • Previously i was able to select tools in the bridge and then select image processor to make jpegs from my tiffs, the image processor tab is no longer on the tools drop down menu

    previously while in bridge, i was able to select tools in the drop down menu and then select image processor to get to the page where i can make tiffs and jpegs. That option is no longer available in the drop down tool selection. How do I make jpegs from my tiffs now in the bridge.
    thanks
    [Moved from the general Cloud forum to the specific Program forum... Mod]

    In current Firefox releases the search bar on the about:home page and the about:newtab page have an autocomplete=off attribute that prevents Firefox from saving form data and now show search suggestions just like you get on the regular Google search page.

  • Web Images and App Store Icons are distorted in MacBook Retina Display

    Recently, most of the icons on Mac App Store are distorted. I also noticed this on web images when browsing using Safari or Google Chrome. By the word "distorted", I mean that the image was not properly loaded, it contains pink lines and multiple blue and pink dots. I even experienced this on Apple website. When I click on "Shop", the images for Macs, iPod, iPhone, etc. are distorted or you can see some image ghosting. I haven't experienced this issue on other non-web applications like Office, Finder, etc.
    Do you think it is a problem with my machine, or my internet connection? My internet connection seems fine when I use other laptop or computer. I even tried browsing the web around 3 AM in the morning when the connections is fast, but the issue is persistent for web browsers (Safari and Chrome) and for App Store as well.
    I am using 13" rMBP, by the way.

    I can now observe the issue on websites that contain large graphics like Flickr. On another laptop (Windows), some websites are not loaded properly because of my internet connection. For my Mac, I think it would be best to test Safari and Chrome using a stable internet connection before asking for technical support just to rule out a possible cause of the problem. Also, some websites that I view, aside from the distorted images, contain codes (maybe HTML codes). This means that the web page is not loaded properly, right?
    My connection speed is 0.48 Mbps for download speed and 0.28 Mbps for upload. Is this too slow for Retina display?
    I bought my MacBook Pro during the first week of November and did not encounter any graphics issue until now. I used to browse the internet and the web images seems to be loaded properly.
    I do not encounter any graphics issues when using other non-web applications like Microsoft Office, Calendar, Photoshop, et al.

  • Can I resize a Quick Selected image so it fits when I cut and paste it on a different background.

    Can I resize a Quick Selected image so it fits when I cut and paste it on a new background? I am trying to take a photo of someone and place it on a different background. The Quick Selected image is too big when I paste it on the background. You can only see a small portion of the persons head.

    Open the photo, then go to Image>resize>image size. Read what the resolution is in px/in.
    Get out of this screen. Then use one of the selection tools to select the person, go to Edit>copy to put it on the clipboard
    Now, go to File>new>blank file. Enter width & height, and the same resolution value.
    Go to Edit>paste. The person will be on a separate layer. Use the move tool to position, and, to resize with the corner handles, if necessary
    Note: For printing, it is desirable to have the resolution in the 240-300px/in range. For web work, 72 px/in is ok

  • How to resize and maintain height and width ratio IR image column

    Hello, I am upgrading from 3.2 to 4.1 reports that include images in report columns. I have had good success with this except for one thing. If the height and width is fixed it distorts the photos, and if I do not have fixed dimensions the image may be too large depending on the original dimensions of the :P1_PHOTO item which is File Browse... BLOB column. I do not want to restrict users ability to upload large image files, or files with different dimensions, but I want them to display as a thumbnail size proportional to the original dimensions in the report, or maybe I need a different approach? Report region template is No Template. I appreciate any suggestions.
    select decode(nvl(dbms_lob.getlength(photo),0),0,null,'<img src="'||apex_util.get_blob_file_src('P1_PHOTO',id)||'" height="75" width="75"/>') photo from table.
    I tried using percent i.e.: width="10%" that does not work.
    I have tried several variations of <style> in page HTML header to change column width, but the image size does not change.
    <style>
    td[headers="PHOTO"] {
    width:75px;
    </style>
    <style>
    #apexir_PHOTO{width: 75px;}
    </style>
    Thanks.

    Try to go with max-width / max-height. However, if you have IE browser, hang on for pain. For some ideas, some links:
    http://wordpress.mfields.org/2011/scaling-images-in-ie8-with-css-max-width/ (ignore object-fit, it is not yet supported on most browser)
    http://stackoverflow.com/questions/3915219/max-width-on-img-tag-not-working-in-ie8
    etc. Be sure to try out your chosen solution on the target browser(s)!
    IE is just nasty :(
    What i have done before is not to have my browser scale my images, especially when the images can be large(r) and you expect quite some traffic. All those extra (kilo)bytes won't help it load faster. I just added an extra column in the table, like photo_thumb, and create a scaled version of the uploaded picture when it is being inserted.
    For example, i have the following process on my apex page, and i'm using wwv_flow_files.
    Have some code:
    IF :P3_FIND_PHOTO IS NOT NULL THEN
       DECLARE
         v_id number;
         v_small_photo blob;
         v_large_photo blob;
         v_mime_type apxt_contacts_img.mime_type%type;
         v_content_type apxt_contacts_img.content_type%type;
       BEGIN
          SELECT blob_content a, blob_content b, mime_type, content_type
          INTO v_small_photo, v_large_photo, v_mime_type, v_content_type
          FROM wwv_flow_files
          WHERE name = :P3_FIND_PHOTO;
          IF lower(v_mime_type) NOT IN ('image/jpg', 'image/jpeg') THEN
             raise_application_error(-20001, 'File for upload is not a jpg!');
          END IF;
          -- Rezise the photo so that it is proportionally 125*125
          -- ordimage is an oracle type able to manipulate all sorts of pictures
          ordimage.process(v_small_photo, 'maxScale=125 125');
          -- If contact is of type personnel, then no need to store
          -- a large photo since it wont be displayed
          IF :P3_CONTACT_TYPE_ID = 2 THEN
            v_large_photo := NULL;
          END IF;
          -- Delete previously uploaded picture
          IF :P3_ID IS NOT NULL THEN
             DELETE FROM apxt_contacts_img
              WHERE contact_id = :P3_ID;
          END IF;
          -- Insert the data into the contacts_img table as a
          -- SELECT from WWV_FLOW_FILES
          INSERT INTO apxt_contacts_img
          (contact_id,
           image_name,
           mime_type,
           content_type,
           filename,
           small_photo,
           large_photo)
          VALUES
          (:P3_ID,
           :P3_LASTNAME,
           v_mime_type,             
           v_content_type,
           :P3_FIND_PHOTO,
           v_small_photo,
           v_large_photo);
          -- Remove the image from the apex wwv_flows_files table
          DELETE FROM wwv_flow_files WHERE name = :P3_FIND_PHOTO;
       END;
    END IF;

Maybe you are looking for