Programmatically create thumbnail/renditions

I'm trying to create a rendition of an image, on the fly, to avoid generating too much of them when uploaded.
The thing seem to work OK until I reference the actual image rendition.
1. I created an OSGi service that uses the appropriate AssetHandler to create the thumbnails
AssetHandler assetHandler = assetStore.getAssetHandler(asset.getMimeType());
2. then I create the thumbnails according to the provided config:
assetHandler.createThumbnails(asset, configs);
No exception is thrown.  Seemed to have worked OK.
3. I make sure the rendition is created:
for (Rendition rendition2 : asset.getRenditions()) {
     logger.info(rendition2.getName() + " " + rendition2.getPath());
It is.  I'm almost happy.
I use the newly created rendition's path in my JSP ... but I have a 404.  The image corresponding to the rendition haven't been written to the CRX repo.  I look in the CRX, and it's not there.
What do I need to do to make the rendition persisted in the CRX?
Thanks for any help!

I would suggest not
I would suspect that Au would rewrite the sesx file at the end of the session (and possibly some sort of recovery version during the session) and it would (I assume) overwrite any changes you made to the sesx file
Messing with a 'live' sesx file would not be something I would advise YMMV
I would simply hit the F8 and let Au record the 'original' marker
I would then do whatever it is you need to do in your .net app allocate the details of this marker in your .net app
When you exit Au the original markers would be written to the sesx file
I would then run some process whichj opened the sesx file and simply replaced the name of the Au marker to the one you wanted in your .net app
Pretty simple really (unless I completely misunderstand the end result you require)

Similar Messages

  • Programmatically creating a Rendezvous : missing variable in Result container

    Hi everybody,
    For my tests purpose, I need to programmatically create a sequence. In this sequence, I need to insert Rendezvous steps.
    Everything works fine when creating them, but when I execute the sequence / steps created this error always show up for rendezvous step : 
    Unknown variable 'TimeoutOccured' ; Error accessing item 'Result.TimeoutOccured'
    According to the TS help, this variable should be created when I configure the step for the rendezvous operation. Drag and dropping the step from the TS insertion palette works fine, and the variable is created when chosing the operation 'rendezvous'. But when doing the same thing through programmation, the variable is not created.
    Here are the steps executed to create the RDV step :
    I create a new step using method Engine.NewStep
    I set the step name using Step.Name
    I set the rendezvous properties using a statement (Parameters.BranchesRendezVous.RDVStep is the variable holding the the step reference) :
    Parameters.BranchesRendezVous.RDVStep.AsStep.Operation = 1, //A value that specifies the operation for the step to perform. The valid values are 0 = Create, 1 = Rendezvous, and 2 = Get Status
    Parameters.BranchesRendezVous.RDVStep.AsStep.NameOrRefExpr = Parameters.BranchesRendezVous.RefName, //Contains the Rendezvous Name expression for the Create operation and the Rendezvous Name or Reference expression for all other Rendezvous operations
    Parameters.BranchesRendezVous.RDVStep.AsStep.TimeoutEnabled = False, //The Timeout Enabled setting for the Rendezvous operation
    Parameters.BranchesRendezVous.RDVStep.AsStep.ErrorOnTimeout = True, //The Timeout Causes Run-Time Error setting for the Rendezvous operation
    Parameters.BranchesRendezVous.RDVStep.AsStep.RendezvousCountExpr = Parameters.NbBranches, //The Number of Threads Per Rendezvous expression for the Create operation
    Parameters.BranchesRendezVous.RDVStep.AsStep.Lifetime = 3, //A value that specifies the Lifetime setting to use for the Create operation. The valid values are 0 = Same as Sequence, 1 = Same as Thread, 2 = Use Object Reference, and 3 = Same as Execution
    4. Then I insert the step in my current sequence using method Sequence.InsertStep
    Everything works fine, the rendezvous step is perfectly created and all properties are set finely. However, the variable TimeouOccured is missing in the Step.Result container (TS help says that this propoerty exists when the step is configured as a rendezvous operation (cf. Operation = 1)).
    Am I doing something wrong somewhere ? Why is this variable missing ?
    Solved!
    Go to Solution.

    Hi Doug,
    TS help says that this property exists when the step is configured as a rendezvous operation (cf. Operation = 1)... So shouldn't it be created when I create / insert the step ?
    I find it very weired to add a subproperty to a StepType, in the Result container...

  • PSE unable to create thumbnails after Album Starter removed

    My sister accepted the upgrade to Adobe Reader 8.0 and said Photoshop Album Starter was automatically loaded on her computer with that upgrade. When she had difficulty working with it, we found some instructions for unloading it, which she did. However, then her problems "really" began. Several pictures on her Desktop were renamed with the PDF file extension, and their thumbnails were totally black. Her "Pix" folder on her Desktop and all the pictures she had in it, plus other pictures stored on her Desktop, disappeared into her Recycle Bin. I restored these files and the folder back to her Desktop, but many of these also had the black thumbnails, or black thumbnails with a thin stripe of colors mixed in with the black across the top. We could still open the pictures, which was a blessing, at least.
    However, things became worse as we discovered that ALL new files created with Photoshop Elements (she has both 3.0 and 1.0 and both responded the same way) will no longer create thumbnails. I opened one of the corrupted-thumbnail photos and copied the layer into a new Photoshop Elements document and saved the file with a new filename and a PSD extension thinking that would give us back a file with a thumbnail. Wrong. Still got a black thumbnail. Tried saving as a JPG; still no go. I then selected New and created a totally new document. Same result; no thumbnail. So I created new documents in her Corel Painter IX and Microsoft Paint to see if this was just an "Adobe" thing, and these other programs had no problem creating normal thumbnails with saved documents. So, it's obviously just an Adobe thing.
    My only thought at this point is that unloading Adobe Album also deleted or corrupted a shared Adobe file that allows Adobe products to create thumbnails. I suggested that she try reloading her Photoshop Elements programs to see if that brings back the ability to create thumbnails.
    Sorry for the long background, but does anyone out there know how to get Photoshop Elements to start creating thumbnails again after getting rid of Album? I'd be ever so grateful if you could help us out!
    Marilyn Lee

    Hey, Marilyn, I found an answer! Well, this doesn't "fix" the problem, but it does allow you to work around it. There is a program (shareware) called "Thumbnail View," and you can find it at the address below.
    http://www.seriema.net/thumbview/index.php...e=download_lite
    It worked for me, and my computer's not very new. I can now see PSD thumbnails where before there was just a little icon. Best of luck.
    B.

  • What is the fastest way to create thumbnails in CS6?

    Hi All...
    I wanted to know if there is a certain way you can take larger images and have them shrink down to a thumbnail size in an automated fashion?  Instead of having to load each image and change the dimensions and export the image as a thumbnail?  I'm using Web Premium CS6 and also have Lightroom 4.  There must be a less tedious method to create a small size and a large size image...
    Any thoughts?

    You can do this easily using Actions and Batching in Photoshop CS6.
    Here are two video tutorials on how to do this in CS6, specifically for creating thumbnails; using actions and batching actions. The guys is a little long-winded but is very comprehensive.
    And here's an article on how to do the same thing. It's from 2007 but explains the process nicely.

  • Programmatically create objects and formulas in Crystal Reports XI Developer edition?

    <p>Is it possible to programatically/dynamically create a text, line, formula field object, etc. in Crystal XI Developer edition?  I have been programming with the Crystal .Net reports component that came with VS 2005 for the past 6 months and know for a fact you can&#39;t programmatically create those objects although you can programmatically control their properties.  My intention is to create a dynamic report that can be reused extensively.  My current work-around for this was to create a generic report with about 40 formula field objects which draws data from 40 corresponding formula fields that I can programmatically set it&#39;s formula thus imitating a report field.  I want to update to the developer edition because I heard with this edition we can programmatically create and manipulate these objects but I found no reference or examples anywhere that proves we can do this?  Does anyone know for a fact or point me to the right place to look for documentation?  TIA</p>

    Hi,
    How can I programmatically refresh list of values status on CR server XI R2?
    Currently, after I modified the data source in the data connection, some of the LOVs in the report prompt window became empty when I tried to generate the report. I have to use Business View Manager to log onto the Crystal reports server XI R2, find and double click the list of values object to bring up the Edit LOV window, and then click on "Refresh Status" button to make the LOV available in the report prompt window.
    What SDK should I use to create a simple application (preferable a desktop application) to find all LOV objects on CR server XI R2 and to refresh their status? That is an application similar to the "Refresh Status" function in Business View Manager.
    I found Report Engine SDK has the Lov.Refresh function to refresh LOV. On the other hand, Report Engine SDK seems to be for BusinessObjects Enterprise, not for Crystal Reports Server. Can this or other function achieve what I want, i.e. to refresh list of values status on CR server XI R2? If yes, can I use it to develop a self-contained desktop application instead of a web application? I only need to run this application after I modify the data source in the data connection, so I prefer not need to deploy it as a web service.
    Thanks for your help.
    C.T.

  • How do I programmatically create and save an empty project?

    I can programmatically create an empty project, but when I drop an
    invoke node on the project, select "Save", and wire in the desired
    path, it results in an "Error 1".  I am getting the error on the "Save"
    invoke node (An input parameter is invalid.)  The only input is the
    path, which is correct.  What am I doing wrong?  Also, how can I
    specify a name for the project?
    Greg

    I think the problem is that you use the current path and strip off the path the current VI's name.  This leaves you with a path that has no filename to save it to.  Put in a build path after it where you build in a project name with a .lvproj extension.  When I did that, the error went away.
    Message Edited by Ravens Fan on 08-08-2007 11:36 PM
    Attachments:
    Create%20and%20Save%20New%20Project[1].png ‏4 KB

  • What is the best (easiest) way to create thumbnails?

    From (image) files selected via JFileChooser, what is the best way to create thumbnails so they can be immediately displayed?

    package projects.web;
    import javax.swing.*;
    public class UploadApplet extends JApplet{
         public void displayGUI(){
              AppletGUI createGUI = new AppletGUI(getRootPane());
         public void init(){
              try{
                   SwingUtilities.invokeAndWait(new Runnable(){
                        public void run(){
                             displayGUI();
              } catch (Exception e){
                   e.printStackTrace();
    } // end UploadApplet class
    package projects.web;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.text.*;
    import java.util.*;
    import java.io.*;
    public class AppletGUI{
         // JButtons
         JButton addButton = new JButton("Add");
         // JPanels
         JPanel containerPanel = new JPanel();
         JPanel optionsPanel = new JPanel();
         JPanel thumbnailPanel = new JPanel();
         // JScrollPane
         JScrollPane thumbnailScroll;
         public AppletGUI(JRootPane topContainer){
              // Add actionListener
              addButton.addActionListener(new ButtonHandler());
              // Set border layout
              containerPanel.setLayout(new BorderLayout());
              // Add buttons to target panels
              optionsPanel.add(addButton);
              // Set size and color of thumbnail panel
              thumbnailPanel.setPreferredSize(new Dimension (600,500));
              thumbnailPanel.setBackground(Color.white);
              thumbnailPanel.setBorder(new LineBorder(Color.black));
              // Add thumbnail panel to scrollpane
              thumbnailScroll = new JScrollPane(thumbnailPanel);
              // Set background color of scrollPane
              thumbnailScroll.setBackground(Color.white);
              // Add subpanels to containerPanel
              containerPanel.add(optionsPanel, BorderLayout.NORTH);
              containerPanel.add(thumbnailScroll, BorderLayout.CENTER);
              // Add containerPanel to rootPane's contentPane
              topContainer.getContentPane().add(containerPanel);
         } // end constructor
         class ButtonHandler implements ActionListener{
              public void actionPerformed(ActionEvent e){
                   new FileBrowser();
              } // end actionPerformed method
         } // end inner class ActionHandler
    } // end AppletGUI class
    package projects.web;
    import java.awt.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.filechooser.*;
    import javax.imageio.*;
    import java.util.*;
    public class FileBrowser{
         JFileChooser fileChooser = new JFileChooser();
         int fileChooserOption;
         LinkedList<File> selectedFilesList = new LinkedList<File>();
         LinkedList<String> fileNames = new LinkedList<String>();
         public FileBrowser(){
              fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
              fileChooser.setMultiSelectionEnabled(true);
              fileChooserOption = fileChooser.showOpenDialog(null);
              if (fileChooserOption == JFileChooser.APPROVE_OPTION){
              for (File selectedFile : fileChooser.getSelectedFiles()){
                        selectedFilesList.add(selectedFile);
                        fileNames.add(selectedFile.getName());
              } // end enhanced for loop
              } // end if
         } // end constructor
    } // end class FileBrowser

  • Create Thumbnail Images

    Hello, I currently use Automator on Mac OS 10.4 Tiger. I most often use this program to create thumbnail images for easy web upload. However, I plan to upgrade my operating system to Leopard soon, and I was wondering, will my Automator workflows that I've created in Tiger work on the Leopard OS? If not, is their an equivalent automation on Leopard that will output thumbnail images?

    without knowing specifics it's hard to say anything definite but leopard automator includes everything Tiger automator had and a whole lot more. the action to create thumbnails is certainly present. you might have to remake the workflow from scratch but it will certainly work.

  • How to create thumbnail images on the fly from JSP or servlet?

    Hi all,
    Iam new to this forum. I need a solution for the problem iam facing in building my site. Ihave groups and briefcase section in my site. I allow users to upload files and pictures.
    When they upload pictures i need to create thumbnail for them on the fly.
    Is there any taglibs or java source to do this from JSP or servlets.
    It would be very greatful if i can get an early answer.
    Please let me know if there is any other forum where i can get better answer, if not here?
    thnx.

    Here is how you can create dynamic images:
    http://developer.java.sun.com/developer/JDCTechTips/2001/tt0821.html#tip2
    However, if you want to create gifs/jpegs and save them to the disk it depends from where you want to create the images. It is different if you are creating from another image or just drawing one from scratch etc.. But in the end you will probably need to use one of the imageencoder classes and write the result to the disk with the file io classes.

  • Creating Thumbnail Images

    Anyone know how to create thumbnail images on the fly?

    First google:
    http://www.google.co.uk/search?hl=en&q=java+create+thumbnail&btnG=Google+Search&meta=
    Then pick the first link:
    http://schmidt.devlib.org/java/save-jpeg-thumbnail.html

  • Creating thumbnail images and storing it as gif or jpg

    Hi all,
    Iam new to this forum. I need a solution for the problem iam facing in building my site. I have groups and briefcase section in my site. I allow users to upload files and pictures.
    When they upload pictures i need to create thumbnail for them and store them as gif or jpeg.
    It would be very greatful if i can get an early answer.
    Please let me know if there is any other forum where i can get better answer, if not here?
    thnx

    I found the following searching through the forum, under jpeg or thumbnail, a while back -- maybe you can use it:
    import java.awt.Image;
    import java.awt.Graphics2D;
    import java.awt.geom.AffineTransform;
    import java.awt.image.BufferedImage;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.io.FileOutputStream;
    import javax.swing.ImageIcon;
    import com.sun.image.codec.jpeg.JPEGCodec;
    import com.sun.image.codec.jpeg.JPEGImageEncoder;
    class Thumbnail {
    public static void main(String[] args) {
    createThumbnail(args[0], args[1], Integer.parseInt(args[2]));
    * Reads an image in a file and creates a thumbnail in another file.
    * @param orig The name of image file.
    * @param thumb The name of thumbnail file. Will be created if necessary.
    * @param maxDim The width and height of the thumbnail must
    * be maxDim pixels or less.
    public static void createThumbnail(String orig, String thumb, int maxDim) {
    try {
    // Get the image from a file.
    Image inImage = new ImageIcon(orig).getImage();
    // Determine the scale.
    double scale = (double)maxDim/(double)inImage.getHeight(null);
    if (inImage.getWidth(null) > inImage.getHeight(null)) {
    scale = (double)maxDim/(double)inImage.getWidth(null);
    // Determine size of new image. One of them
    // should equal maxDim.
    int scaledW = (int)(scale*inImage.getWidth(null));
    int scaledH = (int)(scale*inImage.getHeight(null));
    // Create an image buffer in which to paint on.
    BufferedImage outImage = new BufferedImage(scaledW, scaledH,
    BufferedImage.TYPE_INT_RGB);
    // Set the scale.
    AffineTransform tx = new AffineTransform();
    // If the image is smaller than the desired image size,
    // don't bother scaling.
    if (scale < 1.0d) {
    tx.scale(scale, scale);
    // Paint image.
    Graphics2D g2d = outImage.createGraphics();
    g2d.drawImage(inImage, tx, null);
    g2d.dispose();
    // JPEG-encode the image and write to file.
    OutputStream os = new FileOutputStream(thumb);
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(os);
    encoder.encode(outImage);
    os.close();
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(0);
    V.V.

  • Trying to add album from iphoto into idvd slideshow.  Not all photos are loading.  Message "creating thumbnail images...(31 remaining).  Been there a long time.  What is wrong?

    trying to add album from iphoto into idvd slideshow.  Not all photos are loading.  Message "creating thumbnail images...(31 remaining).  Been there a long time.  What is wrong?

    Open your iPhoto Library, go to that particular album and verify that you can view the full sized version of each image by double clicking on them.  Report back with the results.
    OT

  • IDVD won't create thumbnail images in slide shows

    In a slide show, the window that used to show the photos in a slide show no longer renders thumbnails in the list or grid views. The status at the top of the window just sits there and spins forever, with the text "Creating thumbnail images...." Anyone know of a workaround?

    Neither of these "fixes" has changed anything. I also cleared my cache, ran a diagnostic check, and a virus/trojan scan! Either way, firefox 4 is just not working up to my needs! Should, or can I go back to 3.6?

  • Data Logging a programmatically created shared variable of cluster or array datatype into citadel DB

    Hi,
    Is there a way to log a programmatically created shared variable of cluster or array datatype into citadel DB?
    I have attempted to programmatically create a shared variable of type 'double' and was able to successfully log the same into Citadel DB. In the attachment, Please refer to the attached project SV_TC.lvproj and specifically to SV_W.vi for the code that i have used (W.png file shows the dB in MAX and shared variable in NI Distributed System Manager)
    However when i tried the same approach to create a shared variable 'array of double', i noticed that traces are not getting created and hence data logging isn't happening into the Citadel DB. I was however able to write and read the shared variable array without issues. The same is true with cluster datatype also. Please refer to SN_NW.vi for the code that i have used - only difference from SV_W.vi is that i have tried to create a shared variable of type 'array of double'
    One observation is that if i create an 'array of double' or cluster in a shared variable library using the project explorer and deploy, i could see that these being logged into Citadel DB.
    Hence i want to understand what could be done to achieve the same programmatically? Could you please advice?
    Regards,
    Sridhar
    Attachments:
    SV_TC.zip ‏3925 KB

    Why is the transaction happening over remote?
    Because we need the information to be on our database immediately when they submit it.
    I don't know anything about streams or replication.....
    The web database is run by the company that hosts our web site. We use PL/SQL to show the pages and output the html. It fetches the data the customer is requesting from our database, but I'm struggling to get the best way to insert into our database from there.

  • Programmatically creating a new database

    Is there a way to programmatically create a new database?
    I am on a RH Linux 7.3 box using MySQL with mm.mysql driver.
    Thank you,

    whatever you command u exec at the DB to create a new DB u can run it over JDBC using a CallableStatment. I guess that what you should be doing.

Maybe you are looking for

  • I just bought photoshop and premier elements and I can not get it to run on Windows 8.1 Can anybody help?

    I just bought Adobe photoshop and premier elements and although photoshop and organizer run premiere will not. I have installed it twice with no errors and it still will not run.  OS Name Microsoft Windows 8.1 Version 6.3.9600 Build 9600 Other OS Des

  • Mac mini ppc cd/dvd drive problems plz help

    i wanted to back up all my files onto my dvd+rw disks and when i put the files in a burn folder and hit burn it asks me all the things: what you want to name it how fast to burn it. then i click burn it says prearing data, ten it starts saying its wr

  • Bad TV video filter won't apply

    I can't seem to get the Bad TV and a couple other video effects to apply to a clip. I move the mix button down and can see the video in the canvas, and they render the clip, but there is no change in the video... How do I make these effects work? Tha

  • Is a 2nd generation Ipod unable to update ios beyond 4.2.1?

    I have an older Ipod 2nd generation that I am trying to use for some APPS but cannot download because ios 7 is required.  My ios for the ipod is 4.2.  Can't seem to go any further with update attempts.  Update attempts result in "you have the most cu

  • Insatllation CS6 ? code d'echange ?

    Mon ordi est mort hier... je cherche à installer le CS6 sur un pc de dépannage ! Installation complète réalisée... qd j'ouvre un logiciel, il me demande le numéro de série normal ! mais dans l'espace de désignation du produit il ne me propose pas Ado