Dynamic Image Upload, Resizing Help

Basically here is what I need to do:
For a website backstage I need an admin to be able to upload
a pic of unknown width and height and resize it for 2 standard
widths, one for thumbnail and one for a larger pic. If there is a
good open source package out there or a good way to do it I'm open
to suggestions. Thanks!

Here are a couple of items that could help.
ImageCFC
http://imagecfc.riaforge.org/
TMT_Img
http://www.olimpo.ch/tmt/cfc/tmt_img/
Bryan Ashcraft (remove brain to reply)
Web Application Developer
Wright Medical Technology, Inc.
Macromedia Certified Dreamweaver Developer
Adobe Community Expert (DW) ::
http://www.adobe.com/communities/experts/
"binxsta" <[email protected]> wrote in
message
news:esk8ut$994$[email protected]..
> Basically here is what I need to do:
> For a website backstage I need an admin to be able to
upload a pic of
> unknown
> width and height and resize it for 2 standard widths,
one for thumbnail
> and one
> for a larger pic. If there is a good open source package
out there or a
> good
> way to do it I'm open to suggestions. Thanks!
>

Similar Messages

  • Image upload / resize in "Update Record" form?

    Hi
    I've created a form to add products to a database, it includes an image field using the "upload and resize image" behavior. This works fine.
    But now I'm building the uèpdate form and want to offer users the possibility of either retaining the current file, uploading a new image to the server (and delete/overwrite the previous one if it exists) or delete the current image without uploading a new one.
    how would i go about this?
    thanks.

    Hi Waleed,
    oops, yes, sorry, you´re right of course -- just didn´t read it too carefully :-)
    However, what Somaboy and Dave want, is a little different from what the tutorial explains at this point -- what´s explained there, will of course be deleting that image physically and erasing the file name entry from the table, but that won´t cover the requirement to additionally upload another picture from the same form.
    In this special case I *think* that one would have to perform both deletion processes as "before" triggers -- to make sure that the file as such plus the corresponding table entry are really gone before the upload procedure happens.
    If someone will ever find out a well-working strategy to get this
    (BTW very often asked for) requirement done, many folks here would certainly jump for joy -- also because that´s something you apparently can´t do without implementing a chain of at least custom triggers.
    But there´s also a much easier solution available to those folks who don´t want to bother with implementing custom triggers for this purpose alone :: this is how I´d do it:
    1. use what´s described in step 3 of the tutorial you posted to delete the physical file and the "filename" column entry
    2. pass the current recordset´s ID to the "redirect after update" page, and here...
    3. add a "SELECT file_column FROM table_name WHERE ID" matches the URL parameter ID - query in order to check if this column is empty or not -- and if it´s empty, execute an "upload and resize image" behavior on this page.
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Unique Image/MC Resize Help Needed

    Hi, I'm trying to achieve an effect, I'm hoping someone can
    help me with.
    I want an image to fill the entire screen of a browser window
    & automatically resize to fill the window area no matter the
    size of the browser; here is the exact effect I'm looking for:
    http://www.thewreckers.com/
    You'll notice that if you resize the browser window on the x
    axis, the image gets smaller, but if you resize on the y axis, the
    image
    stays the current size and only moves up and down, keeping
    the blonde singer's eyes centered on the page.
    I'm not a scripter, so exact syntax or even better, a sample
    FLA would be amazing!
    The only complaint I have about the sample is on Safari, the
    browser scroll bars show up.
    Also, how can I lock objects to the corners like the URL
    example?
    Thanks in advance for any solutions you might have.
    P.S. I'm using Flash 8, not CS3
    C

    I've sorted the crop ration for a 3:2 image but resulting in a much smaller image.
    Could you give me the details? How much smaller? What size is it? What else did you change other than the aspect ratio?
    I then then tried a 16:9 ratio which is much better
    Details please? What is better? (And why try this if you need 3:2??)
    seem to have run into a similar prob in that calculations say for a 40 x 20 I'll need 6,000 x 12,000 but lr4 will only ouutput 6,000 by 10,667.
    You are repeating your initial mistake. Images cropped to 16:9 aspect ratio cannot export to a 3:2 aspect ratio. Only images cropped to a 3:2 aspect ratio will export to a 3:2 aspect ratio.

  • Image upload & resize

    case "image/pjpeg": //IE's weird jpeg MIME type

    On 9/19/08 7:05 PM, in article C4F94626.7F2EF%[email protected],<br />"Jefferis Peterson" <[email protected]> wrote:<br /><br />> <br />> Okay, I'm having a problem here. ItemThumb is a text field that stores the<br />> name of the gif or jpg file.<br />> <br />> I have 3 upload file fields  (large, medium, thumb) which are supposed to<br />> store their values (file names??) in the text fields, and I have set  the<br />> ItemThumb to receive its value on insert from the file field.<br />> There seems to be a duplication of field insertion requirements here, so I'm<br />> not sure what to make of the problem, but if I remove the text fields from<br />> the insert transaction, there is no option to store their names in those<br />> fields in the file upload dialog box....<br />> <br />> What is odd is that I'm not getting that error on the medium image text file<br />> even thought it is setup exactly the same as the thumb text...<br />> Jeff <br />> <br />> ~~~~~~~~~~~~<br /><br />After checking the database online, it is adding the information to all the<br />file fields but it is not uploading the images to the directories... Not<br />sure what the reason for the error is...<br />~~~~~~~~~~~~<br />Jefferis Peterson, Pres.<br />Web Design and Marketing<br />http://www.PetersonSales.com

  • Add dynamic images to scrollpane

    Hi there i want to develop an application as hexapartners.net/Application
    I have problem in using the uploaded images in my application.Please refer to following :-
    1. Go to hexapartners.net/Application
    2. Click on "Upload own graphics"
    3. A new window will open, upload ur image in that.
    4. Click on "Icon" on hexapartners page and select "Uploaded" category from combo box.
    5. You will see ur uploaded image in the scrollpane and when u click on that it will be loaded on the right side
    This is what i actually want to do.
    Any idea ??????
    Please somebody help me.

    hi thanks for trying.
    Try in internet explorer or try after sometime, sometimes that site gives an
    error so please just try again.
    I m just explaining what i want and upto now what i  did :-
    Basically i want to add a dynamic image (uploaded by users) to scrollpane in
    order that when i click on an image, the image gets added to one movie clip.
    So, in order to achieve this i have done as follows (without actionscript)
    1) Convert image to button and add on(press) event in it.
    2) In on press event, i add loadMovie(url,mc) so it gets added to movieclip
    when u click on image.
    3) Then i converted this button into movieclip (as i wanted to add it to a
    scrollpane).
    Upto this there is no problem since i used local images but now i want to
    add dynamic images (added by users).....so i dont know how to achieve this.
    Please if u still dont get it ask me again.
    Thanks

  • Image upload directory or server

    I want to upload imges file into directory and want to use
    for Database. I could not get any option in the Form of Dreamweaver
    for image uploading.
    please help me

    Dreamweaver does not come with any file upload scripts. You
    need to either create the script yourself or locate one on the web
    appropriate for the scripting language you are using.

  • Image Upload and Resize Trigger Order Question

    Hello All,
    I do enjoy and like using the ADDT, however I do have a problem with the Image Upload and Resize trigger.
    I understand that this trigger is of the AFTER type, and as such, the insert record I have on the page is implemented first and the data is inserted into the table, then images uploaded provided they are smaller than 200 kB in size.
    However, as I have a field that is unique in the database, if the upload fails I am unable to upload any files which are under the size and put that information into the database, as there is already a record with the unique value.
    Is there an easy way to work around this by trying to capture the error before the data is inserted into the database?
    An idea I have is to: check the unique field with the value to be inserted, if fails, change unique value -> nothing inserted yet, no files uploaded.
    If the unique check passes, insert remaining data and trigger the upload and resize image trigger, once that is complete, have an update of the table to update with the unique value.
    I can see the above working, (I think), but I just have to write the code to implement the idea.
    I am not sure how to use the roll-back triggers either, if the Upload Image trigger fails, to remove the inserted record.  But if I can manage the roll-back trigger to remove the record, that is an option to consider for what I want to achieve.
    Thanks to any help people can provide.
    Cheers,
    Ian.

    Thank you for your reply.
    I have a work-around, I have split the forms over two pages, rather than put everything on one page - which introduced another issue, to which I have made a work-around of sorts too.
    The two forms, on different pages, is probably a better idea in terms of better management of data input. The work-around was a Header redirect based on a form variable, as, if I used a Custom Trigger to dynamically generate a new URL, it generated an escaped-encoded URL - to which I have not figured out how to fix.
    So, in the meantime, it works, so I will settle for that at the moment.
    Again, thanks for you reply.
    Ian.

  • How can to resize an image uploaded in to the smart image

    Hi
        I have an image uploaded into the smartimage from the local file system. How can i resize this file or create a rendition for this image?
    Thanks
    Veena

    Hi
       I got a reference for the same question from Stack Overflow http://stackoverflow.com/questions/14726485/resize-an-image-resource-in-cq5/16728970#16728 970
    I tried the same method
    Resource resourceNew = resource.getResourceResolver().getResource(img.getFileReference());
        Asset asset = resourceNew.adaptTo(Asset.class);
        log.error("asset ****" + asset);
        Layer layer = new Layer(asset.getOriginal().getStream());
        layer.resize(200, 200);
        log.error("layer ****" + layer);
                            Image image = new Image(resource);
        String mimeType = image.getMimeType();
        ByteArrayOutputStream bout = null;
        ByteArrayInputStream bin = null;
        try {
            bout = new ByteArrayOutputStream(2048);
            layer.write(mimeType, 1, bout);
            bin = new ByteArrayInputStream(bout.toByteArray());
            asset.addRendition("resizedImage", bin, mimeType);
    log.error("asset Bin" + asset);
        } finally {
            // close streams ...              
    Where img is my Image object and I was able to create a rendition in the dam.
    But the rendition I am getting is in File format. Is there a way by which i can change it to png format??? any Help will be appreciable..
    Thanks
    Veena

  • Image upload error. Error resizing image: Error converting image (image resize)

    Developer Details:
    Image upload error. Error resizing image: Error converting image (image resize). The "" folder has no write permissions. (IMG_RESIZE)
    User Error:
    Image upload error. Error resizing image.
    tNG Execution Trace - VIEW
    tNG_update.executeTransaction
    STARTER.Trigger_Default_Starter
    tNG_update.doTransaction
    BEFORE.Trigger_Default_saveData
    tNG_update.saveData
    BEFORE.Trigger_Default_FormValidation
    tNG_update.prepareSQL
    tNG_update.executeTransaction - execute sql
    AFTER.Trigger_ImageUpload
    tNG_update.afterUpdateField - frumorsimg, Fimg1.gif*
    tNG_update.getRecordset
    tNG_update.getFakeRsArr
    tNG_update.getLocalRecordset
    tNG_update.getFakeRecordset
    does anybody know why this happens?
    My folders are 777. The image is being uploaded.
    If I turn off the resizing the page loads fine.
    The error appears when having the resizing or when displaying a thumbnail.
    Please help!!!!
    Thank you

    I am not a php guy but just trying to help out..
    1. check what u have configured in the control panel of ADDT for image resize.
    2. i have heard something called GD is used. or image magick.
    3. in asp i use image magic.
    the image resize will use some temporary directory..
    ur webserver will run as some account so ..
    it should have write permission on this temporary directory.
    and the library u specified it to use for resizing should also physically exist.
    and ofcourse the anonymous webuser account should be able to create process to resize this image.

  • Image Upload probelm - Very Urgent. Pls help!!!

    Hi All,
    I am facing very strange problem while uploading a image file (.JPG file) thru a web dynpro view.
    I am accepting a image file from view and uploading it to a ftp server.
    There are two abnormal results I have observed. It does NOT happen for every image upload. But it has been observed to happen during peak Internet hrs. (image size can range from 1MB to 7-8 MBs)
    When 'Upload' button is clicked, one of the following thing happens:-
    1. After taking loooong time (processing circle rotates), browser screen goes totally blank. That is, browser goes into state as if no page is opened (white screen)
    2. After taking loooong time, empty form re-appears. ( ie the view in which i had submitted data and pressed 'Upload')
    I have tried tracing errors in default trace. but no error or exception is displayed !!!
    Following is the code i'm using for uploading file. ==>
    try {
    URL myUrl = new URL("ftp://<some address>");
    FtpURLConnection myConnection = new FtpURLConnection(myUrl);
    myConnection.connect();
    OutputStream out = myConnection.getOutputStream();
    out.write(wdContext.currentPhotosElement().getPhoto1());
    out.close();
    myConnection.close();
    } catch (Exception e) {
    System.err.println("\n\n$$$$$$$$$$$$$Exception in image upload $$$$$$$$$$$$$\n\n");
    e.printStackTrace();
    Please help me as this system is live and lot of users are complaining as they are not able to upload their images..
    Awaiting for reply ..
    regards,
    Amey

    Hi,
    Does anybody have any idea about how the file data (byte stream) flows from Client's machine browser to Web Dynpro's context's element??
    As per my observation and tracing, it is first loading byte array frm client's machine to view's corresponding context node.. And then only it is proceeding with further actions.
    Now in my case, user may upload files ranging frm size 6MB to 10MB, web dynpro application either refreshes or times out during this transfer. I didnt even started FTP process to upload byte[] to remote server !!!
    So how can we increase this speed of transfer from  client's machine to context element ??
    regards,
    Amey

  • Multiple Upload Image Problem - Resize GIF files

    The Multiple Image Upload script seems to handle .jpg images without problems.
    However, .gif files return the error:
    "Error converting image (image resize). Image processing library not available or does not support operation. (imagemagick library is not working or not found)."
    The problem is caused by the fact that script that I'm using tries to pass a parameter that is not valid for gif processing:
    myimage.gif' '-quality' '80'
    The "quality" parameter works only for jpeg and .png files as described here:
    http://www.imagemagick.org/script/command-line-options.php#quality
    Please ensure that the script makes difference between .gif and .jpeg files and use the correct parameters so we can resize the images properly.
    Thanks in advance,
    Márcio

    Hi Marcio,
    >>
    Can you tell me the inconveniance of using GD instead of Imagemagick, or its, shortly similar?
    >>
    sorry, but never worked with ImageMagick so far, so I can´t compare
    >>
    The "quality" parameter works only for jpeg and .png files as described here
    >>
    yeah, it seems that this is a small bug in ADDT´s "includes/common/lib/image/KT_Image.class.php" file. Was just checking the code in there, and indeed it adds this extra parameter regardless the image type -- but I do have an idea how this file can be modified to not use this parameter if the file in question has the suffix ".gif".
    If you feel a little adventurous, I´ll happily invite you to modify some code in this file -- please let me know if you´re ready for some instructions. However, if so, please make a backup of this file first...
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Multiple Image Upload with Save to DB - any help would be appreciated

    Hi - I'm running into the following issue when using the Multiple Image Upload with Save to DB behaviour.
    When I click the link to upload multiple files, I am given the list of local files to choose to upload. No problem here - I can select multiple files.
    When i select choose, the uploader shows the progress but hangs at 0%
    However (if I cancel the uploads), the first image of the group is uploaded and it's corresponding database entry is entered correctly.
    Anyone else have this hangup? If so how did you get around it?
    Thanks!
    Dan

    Just thought I would update.
    The problem seems to be related to redirecting.
    I had specified a redirect page, which of course stops the flash file from continuing to upload images after the first one.
    Anyone know how to change this so when the flash uploader finished it goes back to a list page?
    Thanks again.

  • How do get a dynamic image to open in new browser window

    I'm using DW CS3, mysql (MAMP)   OS 10.6.2   I'm designing my online store.  I need the customer to be able to click dynamic image/thumbnails to view a larger image in a new browser pop up window 400 x 400.  An example of this functionality can be seen at :
    http://www.designpublic.com/spot-on-square-roh-dresser
    So far I can get the separate new browser window to open with the dynamic image, using the open new browser behavior, but the on click also advances to next page with the larger image. You have to press the back button to get back to the product page.  I want the customer to be able to see the product page , while viewing larger image, and then close larger image, and still have the product page open. I don't understand why 2 windows are opening.
    Thanks for the help people!
    William

    Hi
    I did look at it but, (and this is only my opinion, I do not like such effects) it is your decision.
    If you view source you will see -
    <a href="#" onclick="popWin('http://www.designpublic.com/catalog/product/gallery/id/12706/image/91883/', 'gallery', 'width=300,height=300,left=50,top=50,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;" title="Spot on Square Roh Dresser" class="gallery-image-link"><img src="http://arcsmedia01.s3.amazonaws.com/catalog/product/cache/2/thumbnail/56x56/5e06319eda06f020e43594a9c230972d/r/o/roh_dresser1.jpg" alt="" /></a>
    Which is controlled by the javascript function
    popWin()
    which you can view using the firefoxe dev toolbar - view javascript function.
    PZ

  • How can I create a dynamic image button

    Hi
    I want to fill a region with buttons with image. I will execute a PL/SQL procedure to do this. I have made some tests but the image didn't is shown.
    I write in my plsql code:
    htp.p('<input type="image" src="#WORKSPACE_IMAGES#image.png" >');
    Any help?
    I am using Apex 4, EPG, Oracle 11g, Ubuntu environment.
    Tks a lot.
    Ricardo

    There is no "image" type for an INPUT tag
    Oh yes there is.
    >
    I have made some tests but the image didn't is shown.
    I write in my plsql code:
    htp.p('<input type="image" src="#WORKSPACE_IMAGES#image.png" >');Works for me&mdash;in terms of images being displayed&mdash;from a dynamic PL/SQL region. Confirm the image(s) exist as uploaded files and are correctly referenced (case sensitive)? The image(s) are actually workspace images and not associated with a particular application?
    However, the bigger problem likely to arise here is that we don't normally generate <tt>input</tt> elements in APEX in this fashion: we either get APEX to do this for us or we use the <tt>apex_item</tt> API&mdash;which doesn't include a method for generating inputs of type <tt>image</tt>. If this region is generated inside the form APEX generates then page submission will fail with a 404 error as the inputs generated through your PL/SQL are not known to APEX. All you can really do in this fashion is attach an <tt>onclick</tt> event handler to submit the page using the <tt>apex.submit</tt> JavaScript API method, either using a Dynamic Action as Tobias suggests, or directly in your code:
    htp.p(q'{<input type="image" src="#WORKSPACE_IMAGES#icon-1.png" onclick="apex.submit('foo'); return false;" alt="Foo" />}');Which means it's not a great deal different from using an <tt>img</tt> element, as Andy said. There's also the <tt>button</tt> element, which allows you to construct a clickable button using other elements (as long as you don't have to support IE6):
    htp.p(q'{<button type="submit" onclick="apex.submit('bar');"><img src="#WORKSPACE_IMAGES#icon-2.png" alt="Bar" /></button>}');Why have you chosen to try this approach rather using <tt>img</tt> or APEX button templates?
    Edited by: fac586 on 16-Jan-2011 18:00
    Few problems getting Jive to accept the post...

  • Multiple image upload CRASH!!! but works with simple image upload

    I'm getting MAD.
    I'm using php and GD
    While the simple image and re size works like a charm, the multiple image upload or the multiple file upload have a strange behavior.
    It opens the pop-up with flash, then eventually shows me files or thumbnails but when I try to up load I just wait and get the typical "system becoming unstable" flash error.
    As I can see the directory is always generated (I've tried also to put a static directory) but after stargin the upload the flash uploader just crashes and no result.
    Any help would be really appreciated

    Hi Fonzie,
    as the folder is getting created, the issue you´re having is not related to wrong folder permission - it´s something else...
    As I wrote before, che common upload and resize function works perfectly
    this one works perfectly, because it´s just one file to upload and to process, wheras doing that with multiple files might collide with some settings on your server
    So for sure it's not a simple issue as the max filesize
    Are you sure ? Did you check the current "max_upload_filesize" setting ? As long you don´t check it, you can´t know :-)
    As a general rule of thumb, it´s important to be aware of the fact that uploading & resizing images on the server might collide with several PHP settings -- and the more images you upload and resize in one swoop, the closer you´re getting to these limits respectively might even be exceeding them. The following "directives" are those which have an effect on whether your image/file upload & processing will work or not:
    - "max_upload_filesize" :: is sometimes set to just 8 MB on a shared hosting, sometimes 16 MB, sometimes more. This setting will affect the file upload procedure only
    - "set_time_limit" (e.g. 30 seconds) :: if the execution time of a script exceeds this limit for whatever reason, the server simply shuts it down without letting you (respectively the flash uploader) know it´s been shut down. This *might* be the reason why ADDT´s flash uploader hangs respectively returns that error message after some time, because it´s waiting for some response from the server which never comes.
    - "memory_limit" (e.g. 8 MB) :: this directive is a sort of "allocated server RAM" for your account, and it´s in particular the image resizing process which will grab more or less memory resources -- the higher the the resizing factor is, the more RAM is spent, and the more images are getting resized in one swoop, the worser it gets.
    However, all these PHP directives can be changed, and your host might even be so courteous to increase the currently defined values of those abovementioned directives for you -- and that´s what I´m suggesting at this point.
    Cheers
    Günter Schenk
    Adobe Community Expert, Dreamweaver

Maybe you are looking for