create multiple versions of uploaded images

Last post 09-14-2006, 3:37 AM by jonathanmcnamee. 2 replies.
Sort Posts: Previous Next
  •  09-12-2006, 4:12 AM 22616

    create multiple versions of uploaded images

    Hi all,
     
    I've been working on a cms system for my company, and everything is nearly finished except they require that any image that gets uploaded is resized into multiple folders at different resolutions for thumbnails and supersize views etc. I'm trying to see if there's any way that cuteEditor can help me with this? I don't mind doing the resizing myself, if I had a reference to an image array or similar in the Editor1 object.
     
    Currently I'm parsing all the <img> tags in the Editor's text field, and then resizing each of these images multiple times using my own image resizing code. Is there any way I can call the editor's resizing code programatically? [I'm sure its probally better :)]
     
    to finish, I have three folders, (more in future see below)
     
       320x240
       640x480
       1024x768
     
    and I want to be able to say 'foreach (image in Editor1) {resizeImage(image);}'
     
    Thanks in advance,
     
    Jonathan
  •  09-13-2006, 10:32 AM 22665 in reply to 22616

    Re: create multiple versions of uploaded images

    Jonathan,
     
    In the insert_image.aspx dialog, there is a button "Auto thumbnail".
     
    Can you check it? Maybe you can set your own default values to meet your requirements.
     
    After you create the thumbnail file, this file will be named t__oldname.*.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  09-14-2006, 3:37 AM 22700 in reply to 22665

    Re: create multiple versions of uploaded images

    Thanks for replying Adam.
     
    What I need is programmatic access so that I can generate x versions of the uploaded file, eg 640x480, 320x240 etc.

    What I intend to do is allow the correspondents submit articles to the page, and when they insert an image, I want to intercept the image insertion, resize it into several sizes, then return the path of the uploaded image to the CuteEditor as ‘320x240/image.jpg’

    If I can control the returned path to the editor, I can also automatically wrap a hyperlink around each image to show an enlarged version of it, so what I’d like to return is something like this:

    <a href=”enlarge.aspx?imageid=1234”>
    <img src=”320x240/1234.jpg” width=”320” height=”240”/>
    </a>


    I could then use a micro thumbnail [64x48] as an icon for each article when they are listed on our articles index page.


    Another advantage of being able to have programmatic access to the image uploading page is that I’d be able to add the names of all the images for a given article to the database, so that when an article is deleted, I can delete the images associated with it.

    Is there any way I can override that page or the methods it uses? I’ve had a look and they all seem obfuscated/compressed :(
    Thanks for your help
     
    Jonathan
View as RSS news feed in XML