Automatic creation of thumbnail image in BC4J App

I have created a BC4J application using the default wizards that displays the content of the following table:
CREATE TABLE EMPLOYEE_PHOTO (
ID NUMBER (3) NOT NULL,
DESCRIPTION VARCHAR2 (20),
PIC ORDIMAGE,
THUMB ORDIMAGE,
EMPLOYEE_NAME VARCHAR2 (50))
The 'browse' jsp displays the id, description and thumb image.
The 'edit' jsp allows the user to enter the description, employee_name and upload file details for the pic image.
I have 2 problems with the application.
1. How do I set the 'browse' jsp to display the thumb image as an anchor tag that points to the 'edit' jsp ?. I would also like to dynamically set the hint text for the thumb image to 'employee_name' from the database table.
2. In the 'edit' jsp I want to invoke the Intermedia processCopy method to automatically create the thumbnail image from the image file specified by the user. How do I accommodate this method into the default code ?
Thanks in advance
Chris

Chris,
Basically, you have to use the "manual" mode of the rendering instead of the "automatic" mode. The JDev Wizard
generated JSP page uses the "automatic" mode which is hard to customize. The characteristic of the "automatic"
mode is using the <AttributeIterate> tag to iterate through all attributes. You have to change the following JSP files
to achieve what you wanted.
1. DataTableComponent.jsp
<%@ page language="java" import = "oracle.jbo.html.*, oracle.jbo.*" %>
<%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
<%
RequestParameters params = HtmlServices.getRequestParameters(pageContext);
String editTargetParam = params.getParameter("edittarget");
if ("null".equalsIgnoreCase(editTargetParam))
editTargetParam = null;
%>
<jbo:DataSourceRef id="dsBrowse" reference='<%=params.getParameter("datasource")%>' />
<table class="clsTable" cellspacing="1" cellpadding="3">
<tr class="clsTableRow"><%
if (editTargetParam != null)
%>
<th class="clsTableHeader"> </th>
<th class="clsTableHeader"><a href="<jbo:UrlEvent targeturlparam='edittarget' event='Create' datasource='dsBrowse' extraparameters='<%=originURL=" + params.getParameter("originURL")%">'/>">New</a></th><%
%>
<th title="<jbo:ShowHint datasource="dsBrowse" hintname='TOOLTIP' dataitem="Id"/>" class="vrTableHeader"><jbo:ShowHint datasource="dsBrowse" hintname="LABEL" dataitem="Id">##Column</jbo:ShowHint></th>
<th title="<jbo:ShowHint datasource="dsBrowse" hintname='TOOLTIP' dataitem="Description"/>" class="vrTableHeader"><jbo:ShowHint datasource="dsBrowse" hintname="LABEL" dataitem="Description">##Column</jbo:ShowHint></th>
<th title="<jbo:ShowHint datasource="dsBrowse" hintname='TOOLTIP' dataitem="Thumb"/>" class="vrTableHeader"><jbo:ShowHint datasource="dsBrowse" hintname="LABEL" dataitem="Thumb">##Column</jbo:ShowHint></th>
</tr><%
Row currentRow = dsBrowse.getRowSet().getCurrentRow();
%>
<jbo:RowsetIterate datasource="dsBrowse" changecurrentrow="false" userange="true">
<jbo:Row id="aRow" datasource="dsBrowse" action="Active"/><%
String rowStyle;
if (aRow == currentRow)
rowStyle = "clsCurrentTableRow";
else
rowStyle = "clsTableRow";
%>
<tr class="<%=rowStyle%>"><%
if (editTargetParam != null)
%>
<td class="tablecell"><a href="<jbo:UrlEvent targeturlparam='originURL' event='Delete' datasource='dsBrowse' addrowkey='true'/>">Delete</a>
</td>
<td class="tablecell"><a href="<jbo:UrlEvent targeturlparam='edittarget' event='Edit' datasource='dsBrowse' addrowkey='true' extraparameters='<%="originURL=" + params.getParameter("originURL")%>'/>">Edit</a>
</td><%
%>
<td title="<jbo:ShowHint hintname='TOOLTIP' dataitem="Id"/>" class="tablecell" >
<jbo:RenderValue datasource="dsBrowse" dataitem="Id">##Cell</jbo:RenderValue>
</td>
<td title="<jbo:ShowHint hintname='TOOLTIP' dataitem="Description"/>" class="tablecell" >
<jbo:RenderValue datasource="dsBrowse" dataitem="Description">##Cell</jbo:RenderValue>
</td>
<td title="<jbo:ShowHint hintname='TOOLTIP' dataitem="Thumb"/>" class="tablecell" >
<A href="<jbo:UrlEvent targeturlparam='edittarget' event='Edit' datasource='dsBrowse' addrowkey='true' extraparameters='<%="originURL=" + params.getParameter("originURL")%>'/>">
<jbo:EmbedImage datasource="dsBrowse" mediaattr="Thumb" altattr="EmployeeName" />
</A>
</td>
</tr>
</jbo:RowsetIterate>
</table>
2. DataEditComponent.jsp
<%@ page language="java" import = "oracle.jbo.html.*" %>
<%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
<%
RequestParameters params = HtmlServices.getRequestParameters(pageContext);
String dsParam = params.getParameter("datasource");
String formName = dsParam + "_form";
String rowAction = "Current";
%>
<jbo:DataSourceRef id="dsEdit" reference="<%=dsParam%>" />
<jbo:OnEvent name="edit" datasource="dsEdit">
<% rowAction = "Get"; %>
</jbo:OnEvent>
<jbo:OnEvent name="create" datasource="dsEdit">
<% rowAction = "Create"; %>
</jbo:OnEvent>
<form name="<%=formName%>" action="<%=params.getParameter("targetURL")%>" method="post" enctype="multipart/form-data">
<jbo:Row id="rowEdit" datasource="dsEdit" rowkeyparam="jboRowKey" action="<%=rowAction%>">
<table border="0">
<tr>
<td title="<jbo:ShowHint hintname='TOOLTIP' dataitem="Id"/>" align="right">
<b>
<jbo:ShowHint hintname="LABEL" dataitem="Id">##Column</jbo:ShowHint>
</b>
</td>
<td title="<jbo:ShowHint hintname='TOOLTIP' dataitem="Id"/>">
<jbo:InputRender datasource="dsEdit" dataitem="Id" formname="<%=formName%>" />
</td>
</tr>
<tr>
<td title="<jbo:ShowHint hintname='TOOLTIP' dataitem="Description"/>" align="right">
<b>
<jbo:ShowHint hintname="LABEL" dataitem="Description">##Column</jbo:ShowHint>
</b>
</td>
<td title="<jbo:ShowHint hintname='TOOLTIP' dataitem="Description"/>">
<jbo:InputRender datasource="dsEdit" dataitem="Description" formname="<%=formName%>" />
</td>
</tr>
<tr>
<td title="<jbo:ShowHint hintname='TOOLTIP' dataitem="Pic"/>" align="right">
<b>
<jbo:ShowHint hintname="LABEL" dataitem="Pic">##Column</jbo:ShowHint>
</b>
</td>
<td title="<jbo:ShowHint hintname='TOOLTIP' dataitem="Pic"/>">
<jbo:InputRender datasource="dsEdit" dataitem="Pic" formname="<%=formName%>" />
</td>
</tr>
<tr>
<td title="<jbo:ShowHint hintname='TOOLTIP' dataitem="EmployeeName"/>" align="right">
<b>
<jbo:ShowHint hintname="LABEL" dataitem="EmployeeName">##Column</jbo:ShowHint>
</b>
</td>
<td title="<jbo:ShowHint hintname='TOOLTIP' dataitem="EmployeeName"/>">
<jbo:InputRender datasource="dsEdit" dataitem="EmployeeName" formname="<%=formName%>" />
</td>
</tr>
</table>
<jbo:FormEvent event="update" datasource="dsEdit" addrowkey="true" />
</jbo:Row>
<%-- Pass along originURL parameter --%>
<input type="hidden" name="originURL" value="<%=params.getParameter("originURL")%>">
<input type="submit" value="Update">
<input type="reset" value="Reset">
</form>
3. DataHandlerComponent.jsp
<%@ page language="java" %>
<%@ page errorPage="errorpage.jsp" %>
<%@ page import="oracle.jbo.ApplicationModule" %>
<%@ page import="oracle.jbo.html.*" %>
<%@ page import="oracle.ord.im.*" %>
<%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
<%
RequestParameters params = HtmlServices.getRequestParameters(pageContext);
String targetParam = params.getParameter("targetURL");
String amId = params.getParameter("amId");
String voName = params.getParameter("jboEventVo");
%>
<%
if (voName != null)
{ %>
<jbo:DataSource id="ds" appid="<%=amId%>" viewobject="<%=voName%>" />
<jbo:OnEvent name="update">
<jbo:Row id="myrow" datasource="ds" rowkeyparam="jboRowKey" action="Update" />
<%
myrow.setAttribute("Thumb", new OrdImageDomain());
String myRowKey = myrow.getKey().toStringFormat(false);
%>
<jbo:PostChanges appid="<%=amId%>" />
<jbo:Row id="theRow" datasource="ds" action="Find" rowkeyparam="jboRowKey" >
<%
OrdImageDomain pic = (OrdImageDomain) theRow.getAttribute("Pic");
OrdImageDomain thumb = (OrdImageDomain) theRow.getAttribute("Thumb");
pic.processCopy("scale=\"0.1\"", thumb);
%>
</jbo:Row>
</jbo:OnEvent>
<jbo:OnEvent name="delete">
<jbo:Row id="delrow" datasource="ds" rowkeyparam="jboRowKey" action="Delete" />
</jbo:OnEvent>
<%-- Scroll event handling --%>
<jbo:OnEvent list="firstset, nextset, previousset, lastset">
<jbo:RowsetNavigate datasource="ds" />
</jbo:OnEvent>
<%-- Navigation event handling --%>
<jbo:OnEvent list="first, next, previous, last">
<jbo:RowsetNavigate datasource="ds" />
</jbo:OnEvent>
<%-- Query event handling --%>
<jbo:OnEvent name="Del Criteria" >
<% String remove = params.getParameter("index"); %>
<jbo:ViewCriteria id="vc" datasource="ds" action="append">
<jbo:CriteriaRow id="row<%=remove%>" index="<%=remove%>" clearall="true" />
</jbo:ViewCriteria>
</jbo:OnEvent>
<jbo:OnEvent name="Clear All" >
<jbo:ViewCriteria id="vc" datasource="ds" action="new" />
</jbo:OnEvent>
<jbo:OnEvent list="Search, Add Criteria" >
<% String rowParam = params.getParameter("nRows");
int nRows = 0;
if (rowParam != null)
try { nRows = Integer.parseInt(rowParam); }
catch (Exception ex) { }
%>
<jbo:ViewCriteria id="vc" datasource="ds" action="new">
<% for (int index=0; index < nRows; index++)
{ %>
<jbo:CriteriaRow id="row<%=index%>" >
<jbo:AttributeIterate id="attrvc" datasource="ds" queriableonly="true">
<% String item = attrvc.getName();
String value = params.getParameter("row" + index + "_" + item); %>
<jbo:Criteria dataitem="<%=item%>" value="<%=value%>" />
</jbo:AttributeIterate>
</jbo:CriteriaRow>
<% } %>
</jbo:ViewCriteria>
</jbo:OnEvent>
<% }%>
<%-- Transaction event handling --%>
<jbo:OnEvent name="Commit" >
<jbo:Commit appid="<%=amId%>"/>
</jbo:OnEvent>
<jbo:OnEvent name="Rollback" >
<jbo:RollBack appid="<%=amId%>"/>
</jbo:OnEvent>
Hope this helps.
richard
</a>

Similar Messages

  • Automatic creation of Thumbnail in EasyDMS

    Hi Experts,
    When I'm checking in an document with the EasyDMS Browser and apply, the DMS creates an thumbnail which is only shown in WebUI and SAP GUI but not in EasyDMS Browser.
    But when I check in an document via WebUI or SAP GUI this thumbnail is not created.
    Any ideas how I can switch off the creation of the thumbnail?
    Thanks,
    Pascal

    Hi Pascal,
    You can use these workstation applications in document management to display images that are assigned to a document info record (DIR) as thumbnails.
    The workstation applications are used for display per document type in the sequence defined.
    When displaying thumbnails, the system first takes the first Customizing entry. If the document of this document type has no image of this format, the system checks the next Customizing entry.
    If there are no images with the formats defined in Customizing, no thumbnail is displayed.
    /Tilak Raj

  • The Thumbnail Images of Apps are All Messed up and Have been for days!

    My Thumbnail images for the Apps are CONSTANTLY in the Wrong spot (Switched with another app or duplicated for the wrong app) or shows a Line Drawing of a CAMERA. Koi Fish is Half Koi Fish on Top and Camera Line Drawing on the Bottom. The ecurrency app, shows the Thumbnail for Glass Harp app. Every Page has at least two similar errors! I Have the Latest Iphone Update. It did it before AND After Update. I Posted a TwitPic so you could see a screen shot if you wish.
    http://twitpic.com/hoc46
    This Iphone 3GS is My Second one. My First died in just twenty days with the "Red Sliver of Death" Battery Symbol ( Died Would Not Recharge). The Mac Store Replaced for free. ( Bless Them). This new Iphone is unbelievably Glitchy. Screen occasionally goes to a Very Dim brightness during use for no reason. recently Lost ALL Sound ( Mute Button NOT ON only worked with Headphones) until I downloaded the newest iphone software which seemed to fix it

    Before Anyone asks about the "Other Glitches", They Include,
    • A Sudden drop in brightness level that only restarting seems to fix. It will just drop to 15% of Normal Brightness for no reason. (about Once a day, about 15 times total)
    • The Camera Shutter works Very Slowly sometimes for no reason at all. I push to click, then the shutter goes into a Slowmotion movement and seems to freeze with the fins in the "Snap Image, Closed fins over Screen Position". It can freeze for a second or two. Stops you from taking another "Fast Shot". (About every 5th Picture or 7 times a day)
    • The Iphone seems to get quite HOT when Playing "Defend Your Castle". I'm playing at the high levels. Could an App make the Phone heat up?
    • The Iphone periodically vibrates for no special reason. Mostly like short pulses. Not a big glitch, just odd ( 5 times a day)
    •The Iphone mute button is too easily pushed BY YOUR EARLOBE) when you have the phone against your ear listening to a conversation.
    • About three times since I've had this replacement (About 2.5 weeks). The phone has simply gone dead and shut off during a call. It turns right back on and works.
    •The Orientation of the phone is off. If i start the Ibeer App or the Level app, it thinks straight up is around the 1 or 2 oclock position. Is there a way to calibrate the whole phone? Not just the Level App?
    •About once a day the keyboard freezes with a Letter in the Up Postion. When you Push the keys and that "Flag" letter Pops up.

  • How can I automate creation of various thumbnails of an image with different filenames?

    I load an image, SampleA.jpg.  I want to automate creation of different sized thumbnails, one that is 640x360 and called SampleA iStock.jpg, and one that is 360x203 and called SampleA Revostock.jpg.  I want these files to be stored in the same directory as the source image.
    To my knowledge actions cannot do this because they hardwire the directory used when recording the action.
    I've also looked into scripts and batch processing and can't figure out how they can accomplish this.
    If anyone could list a simple step by step instruction how I can do this I would be very appreciative!

    I would recommend you post on the Photoshop Scripting Forum when you have questions regarding Photoshop Scripting.
    http://forums.adobe.com/community/photoshop/photoshop_scripting?view=discussions

  • Linked Images : Automatic Folder Creation for linked images?

    Best Rgards
    Mac OSX 10.9.3
    InDesign CC (9.2.1)
    Presently: 120 page Blurb publishing with 190 images
    I have created a large number of INDD documents that I piece together from many sources,
    such as file folders, internet searches, external drives, emails...kind of grabbing things
    from all over the place. usually I publish this as a PDF for local and archival use. Sometimes
    using this also for newsletters and other ways to distribute documents as pdf and epub.
    I never really paid to much attention to LINKED FILES and where they might
    be located, as my intent was PDF and you can publish a very
    serviceable Pdf without verifying or correcting MISSING LINKS...
    NOW, I am working on a higher end 120 page Photo BOOK to have printed on paper.
    I did not organise my image assets into a folder, i should have first. Now as I go to
    upload to the publisher I find I have to many missing links to images. So I am going
    back through the whole project and organising the assets and re-linking...what a lot of work this is.
    I was wondering if InDesign supports automatic creation of assets folder?
    As you place images, with their links, the program creates a folder and puts a copy of the file there?
    I don't see anything about this subject.
    I am wondering why not? It would sure make the work flow speed up. Options for
    the format, size, pip etc. Does this exist in InDesign and if not
    wtf not?
    Sure would appreciate anyone's thoughts on this. It is to late now to save this
    relinking 190 images, but I realise I need to be better prepared with my assets in the
    future. I work on a number of publications, some spontaneously and others
    more carefully planned...some sort of auto process for asset-linked-folders
    seems a simple enough coding issue. It is 2014 already.
    ???....best rgards, Thanks for any input on this issue.
    WF Posey
    Pantelleria Italy

    Thanks to everyone for these answers. I guess the real answer is "no", Adobe software engineers see no reason to create a script which
    will place linked files into a folder. To bad. A really serious and lazy oversight in my view. The package function is helpful if one has already
    organised their assetts.
    As great as these programs are, this is an oversight of some frustration. As I said in my comments above, it seems an easy enough routine to program
    into the app. Why should a user have to worry about collecting details of resources/links for a document?
    Even after all these years?
    Best regards, thanks to everyone who contributed some thoughts.
    WFP

  • Safari Top Sites thumbnail images not updating automatically?

    is it happening just with me, or the automatic update of the Top Sites thumbnail images is not working anymore?

    It is intentional. When on the Top Sites view, hit Command+R to refresh the images. Supposedly this was done because the previews don't do a good enough job of detecting weird login pages and wifi password pages.
    Personally, I'd like it to have an option to go back to updating the images on its own again.

  • Is there a way to change the automatic optimization of the Thumbnail images in Webgallery?

    Is there a way to change the automatic optimization of the Thumbnail images in webgallery found in Photoshop (CS3 or Photoshop elements-- I have both)?  The thumbnails come out so blurry that it's embarrassing (for an art site). Thanks.

    Thanks for your response. Your websites look great!  You are to be complimented on your fine design work.
    I've been doing custom sized thumbnails, at around 300px, but they are still a little blurry, like when JPEGs are over optimized and some isolated areas look like they are churning, one shape melting into another like boiling water.  Then, I tried even larger thumbnails, and then shrunk them to a smaller size using HTML commands, hoping  that shrinking them smaller would help tighten up the blurry churning areas. They looked a little better, but the churning areas remained.  When I open up the individual thumbnails in Photoshop and I try using the unsharp mask or the sharpen function, it gets even worse.

  • Automatically generate thumbnail image icons for all pix and vids...

    hello,
    i've searched around on the forums a bit about making the icons of my pics and vids actual thumbnail images made from the picture or the first frame of the video.
    a lot of responses are mistaking this question for "how do i put the window into icon view?" this infact is not the answer that i suspect a lot of windows converts are looking for.
    windows automatically makes such icons for all pix and vids if you put the window into icon view.
    i notice in at cmd-j or in the window preferences there is a checkbox for "show image preview" or something like that, but despite this being checked, my pix and vids do not show an image preview. i'm gathering that this information does not exist in the resource fork which mac uses to organize photos.
    is there any script or addition i can make to my system to automatically generate icons for pics and vids of all types? how to i suggest to mac that they add this functionality into the next release?
    thanks for your time,
    max

    The Finder will create icons "on the fly" for nearly all graphic type files (jpegs, tiff, psd, and so on) and display them in both icon view and column view, provided the appropriate view preference has been set. Movies will just have the generic movie icon in icon view, and have a "live" preview in column view, ie you can play them in preview mode. If you want to add a permanent thumbnail which will display in all views, and whether or not the preference has been set for a particular folder in Finder, you'll need to add a thumbnail to the file. There are lots of ways to do this for static pictures, even rather clumsy ways to do it for movies, but the easiest thing is to get CocoThumbX:
    http://www.stalkingwolf.net/software/cocothumbx/
    Drag and drop both static pictures and movie files onto the application and a permanent thumbnail is created. Indeed, it will create cool thumbs even for things like PDF and HTML files (code or rendered display). For movies to get a thumb, they must be in a format that QuickTime can read. It has a set of preferences for just how you want the thumb determined (eg random or at a certain time), and you can drop batches of movies or even folders to have it assign thumbs to multiple movies at the same time. It is a way cool piece of shareware.
    Francine
    Francine
    Schwieder

  • Automatic creation of image

    Hello,
    As I'm preparing for my Powerbook to arrive with a fresh new harddrive, I've decided to not have my data lost again. What I will do is copy my userhome to an external drive every day and once a week make a full image of the entire harddisk to that same external drive.
    I'm sure I'll figure out the copying bit. There are dozens of tools out there to do it for me (although I've found to be rather disappointing, only Apple Backup seems to be really worth while - but I have no need for a .mac account so that option is out).
    However, the automatic making of an image is something I've never attempted on a Mac. If I insert my Tiger install dvd, I can run Disk Utility and with that make a dmg file which I'm guessing I could restore should something happen to the original drive. However, this requires me to do something and I'd prefer to have this done automatic.
    So, what do I do? The system needs to reboot into a different partition, I'm guessing ... which then starts the imaging process. How do I (a) make the system reboot at a specific moment, every week; (b) make it boot from a different partition; (c) how exactly do I have disks automounted (USB connected drive, HFS+ formatted) and (d) how do I have Disk Utility automatically make an image?
    Thanks
    Rob

    Hi Rob,
    You have a lot of questions here which I would not be really great at answering, however, there is a great FAQ about backing up that may answer some of your quetitons here:
    http://www.thexlab.com/faqs/backuprecovery.html
    Retrospect is an excellent backup too, Backup, apples solution is o.k. for backing up your home folder and for backing up your "iApps". (itunes, iMovier and such), but is not a comprehensive solution.
    You can use Disk Utility for some backups. A lot of folks use programs that will clone their hard drive to another, Programs such as Super Duper and Carbon Copy Cloner are designed to do just that.
    If you plan on copying to a USB drive a couple of things to remember. First it is going to be a bit slower than using a Firewire drive. Second, you cannot boot from a USB drive.
    Some of the automation could be accomplished using Automator, the built in tool provided by Apple with 10.4. I have never used it but have read some articles about it and it could handle the automation task for you, I think. You might check and see if there is a ready made script available from Apple.
    Hope it all gets worked out,I applaud your desire to have a backup system. The most important thing about any backup system is ti use it!

  • Reg Thumbnail image creation.

    Hi am in need of creating a thumbnail image from a normal image. I have taken the source from http://schmidt.devlib.org/java/save-jpeg-thumbnail.html
    its not in other system while both are having same configuration and platform.
    im gettting a blank thumbnail file created as per my specified width and height.
    i found that its workin in some other system is there any other config related issues are there pls help me.
    thanks
    Balaji.M

    sorry i hav misstyped some thing.
    when i execute the following code its creating a image file of my specified size but its blank
    but i have executed the same code in some other machine its running fine.. so i wish to know is there any issues with the file system permission r some other config related issues.
    import com.sun.image.codec.jpeg.*;
    import java.awt.*;
    import java.awt.image.*;
    import java.io.*;
    * Thumbnail.java (requires Java 1.2+)
    * Load an image, scale it down and save it as a JPEG file.
    * @author Marco Schmidt
    public class Thumbnail {
    public static void main(String[] args) throws Exception {
    if (args.length != 5) {
    System.err.println("Usage: java Thumbnail INFILE " +
    "OUTFILE WIDTH HEIGHT QUALITY");
    System.exit(1);
    // load image from INFILE
    Image image = Toolkit.getDefaultToolkit().getImage(args[0]);
    MediaTracker mediaTracker = new MediaTracker(new Container());
    mediaTracker.addImage(image, 0);
    mediaTracker.waitForID(0);
    // determine thumbnail size from WIDTH and HEIGHT
    int thumbWidth = Integer.parseInt(args[2]);
    int thumbHeight = Integer.parseInt(args[3]);
    double thumbRatio = (double)thumbWidth / (double)thumbHeight;
    int imageWidth = image.getWidth(null);
    int imageHeight = image.getHeight(null);
    double imageRatio = (double)imageWidth / (double)imageHeight;
    if (thumbRatio < imageRatio) {
    thumbHeight = (int)(thumbWidth / imageRatio);
    } else {
    thumbWidth = (int)(thumbHeight * imageRatio);
    // draw original image to thumbnail image object and
    // scale it to the new size on-the-fly
    BufferedImage thumbImage = new BufferedImage(thumbWidth,
    thumbHeight, BufferedImage.TYPE_INT_RGB);
    Graphics2D graphics2D = thumbImage.createGraphics();
    graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
    RenderingHints.VALUE_INTERPOLATION_BILINEAR);
    graphics2D.drawImage(image, 0, 0, thumbWidth, thumbHeight, null);
    // save thumbnail image to OUTFILE
    BufferedOutputStream out = new BufferedOutputStream(new
    FileOutputStream(args[1]));
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
    JPEGEncodeParam param = encoder.
    getDefaultJPEGEncodeParam(thumbImage);
    int quality = Integer.parseInt(args[4]);
    quality = Math.max(0, Math.min(quality, 100));
    param.setQuality((float)quality / 100.0f, false);
    encoder.setJPEGEncodeParam(param);
    encoder.encode(thumbImage);
    out.close();
    System.out.println("Done.");
    System.exit(0);
    }

  • How to rotate a thumbnail image in Finder?

    Is there a way to rotate a thumbnail image in Finder? When I click a photo in a Finder folder, the image automatically opens in Preview and the image is correctly displayed right side up. But the thumbnail image is displaying a vertical photo horizontally. Can I rotate the thumbnail?

    corelle,
    please open the sidebar of the Preview window and check how the thumbnail is displayed there.
    If the orientation is wrong in the Preview sidebar as well, then apparently some program rotated the image but not the EXIF preview image, which is obviously not a good thing.
    If the orientation is correct in the Preview sidebar, but wrong in the Finder, then the file probably has a custom icon with wrong orientation. This should then be removed rather than rotated. It's useless anyhow because Snow Leopard's Finder can better use the EXIF preview image instead.

  • Some Thumbnail images not showing up in folders? just a icon

    Just bought a Brand new Mac with i7 processor. It did not come with Lion installed though. So before doing anything I upgraded to the free Lion update. So here is the issue.
    For some reason i cant view preview thumbnail images of some .ARW and .jpg files in some folders, while others I can. I made sure all the "view options" were set and everything. Also moved files to new folders. So here is what I did.
    1. Reformated and Reinstalled Snow Leopard and put my .ARW files and the preview thumbnails show up in all folders with no issues. Then I updated to Lion again and now some show and some don't. The funny thing is that now files that did not show thumbnails the first time now does, and some that shown thumbnails now don't. Its different each time I install Lion OS
    2. I removed the hidden .DS_Store files in these folders just to make sure those where not effecting it as well, but it did not do anything after a new one appeared.
    Whats up with Lion? known bug? I did a search and did not hear about this issue yet? Am I the first lucky one?

    I am having similar problems with viewing jpgs in preview / finder in 10.7... but only those that were create by either lightroom or photoshop ( LR 3 / PS CS4) after installing Lion... they preview fine in bridge and every other app.... Just not in Finder etc....
    Very annoying!
    If anyone has any suggestions, I am all ears.

  • XML scrolling thumbnail, image loader, & Buttons [halfway works]

    Intro:
    I started a flash-based website a few years ago. Back in 2006 I was able to get a xml scrolling thumbnail, image loader to work without a glitch.
    For numerous reasons I had to put the project on hold until now. [one was that my 30 day trial of flash expired and only recently was I able to purchase the Adobe Web Suite CS4 as well as a new computer which could run the apps.]
    Last Friday saw a bump in the road in the development of my site as two, rather straightforward task, turned into something short of a nightmare as I have been unable to get past these two, seemingly, relatively simple task.
    I have posted in 4 other flash forums the issues, in detail, that I am facing - and have quite a bit of interest/views in the topic as the numbers suggest - yet no response/answer as of yet. [Which confirms other messages I have seen which seem to state that working with buttons has become increasingly difficult with the newer version of flash - something Im a bit surprised with actually from Adobe. - I would have thought there would be a palette where you could set parameters...]
    Screenshot of Site/Timeline:
    Before getting into the two questions I have, I would like to post an image of the site as it looks whenever an swf file is saved out, as well as a piece of the timeline in the back for reference.
    Issue #1
    As of now when the swf file is saved out you get exactly what you see above:
    a: A scrolling thumbnail
    b: ...which loads a large image when clicked on it - PEFECT...
    BUT...
    1a: I need for the buttons to load in this action, not for it to just load on its own.
    [i.e., the silk_paintings gallery is what is open, so I need the "silk_paintings" button to call up this action]
    note: Initially I had attacked this problem by taking out the actions layer you see above and applying it directly to the individual buttons with some crude MouseEvent Listener/Handerls... that did not work - at all.
    Im sure it may be "easier" to make an array out of it, but with my coding level it may be "easier" to apply it to the buttons.
    1b: How I currently see it, I would take the xml-list and duplicate it for the number of galleries I have.
    [I would then re-name the xml-list to reflect the name of the galleries they are to represent, i.e. "silk_paintings"]
    [also, I would have to rename the folders to "thumbnails1,2,3, etc., & "images 1,2,3, etc"
    From there I would duplicate the actions and paste it into the buttons, changing the xml-list name to that of "silk_paintings", etc., as well as write in the MouseEvent listener Handler to make it work. [ah, ha, but what is that magic phrase, I have tried to implement various code from other tutorials, and all in vein.]
    Issue #2
    At this point I would be tickled pink just to get this to basic function to work.
    However, once the buttons are working and calling up the xml, etc., then I need the buttons to stay on the semi-transparent blue color it is whenever in the 'hit' state. [note: NOT pictured above.]
    With the way the buttons are currently set up, and with wanting to use scripting to get them to interact with the thumbnail gallery, it will have to be some miraculous code to tell that button what color to stay as whenever its clicked, and of course it going back to white when another button is clicked.
    Conclusion:
    Since this is an Adobe Forum I would like to make a few additional statements in hopes that the developers, etc. may take heed.
    Adobes products are not cheap, and when I went to purchase the websuite I went in as a designer needing a program as not to need to program.
    I understand the flexibility that coding gives, but something as simple as linking buttons should not be in the realms of rocket science. [yes, for many its not...but my brain just does not operate that route despite all the tutorials thrown at me.]
    Again, it would seem that there would be a button panel where you could drag options like scrolling thumbnail slider, loader, and then parameters would come up. [much like Apples iWeb. - but before the argument of one being pro and the other for non-pros, I see it differently. Software should not be the limiting factor in how flexible you can design, or rather ones lack of programming shouldnt be. With all the talented, and I say this in all humility and honesty, programmers working for Adobe, Im sure something could be programmed like what Im asking for.]
    note: Director is a good example, back in 1997 I knew nothing of multimedia and in one week I had assembled a portfolio, clicking buttons, speech, movies, and all. - and no, I dont have the money to buy more software!
    At this moment I am at the mercy of someone who reads code like its a nighttime tale they are telling their kids, and who can see the exact issue I have and can share the appropriate, correct code. [as I have noticed, it has to be on target - naturally - but this target changes with just a slight change in the design.]
    Thank you,
    peace
    Dalen
    p.s.
    The actionscript: [note: This is only the current working/good code that Im trying to get the buttons to call up.]
    stop();
    fscommand("allowscale", false);//keep SWF display at 100%
    var x:XML = new XML ();//Define XML Object
    x.ignoreWhite = true;
    var fullURL:Array = new Array;//Array of full size image urls
    var thumbURL:Array = new Array;//Array of thumbnail urls
    var thumbX:Number = 25;//Initial offset of _x for first thumbnail
    x.onLoad = function(){ //Function runs after XML is loaded
        var photos:Array = this.firstChild.childNodes;//Defines variable for length of XML file
         for (i=0;i<photos.length;i++) {//For loop to step through all entry lines of XML file
              fullURL.push(photos[i].attributes.urls);//Each loop, adds URL for full sized image to Array fullURL
              thumbURL.push(photos[i].attributes.thumbs);//Each loop, adds URL for thumbnails to Array thumbURL
              trace(i+". Full Image = "+fullURL[i]+"  Thumb Image = "+thumbURL[i]);         
              var t = panel.attachMovie("b","b"+i,i);//Each loop, Define local variable 't' as a new instance of 'b' movie clip, given unique instance name of 'b' plus the index number of the For loop
              t.img.loadMovie(thumbURL[i]);// Each loop, load thumbnail image from XML data into variable movie clip
              t._y = 0;//Set Y coordinate of variable movie clip
              t._x = thumbX;//Set X coordinate of variable movie clip based on variable thumbX
              t.numb = i;//Set sub-variable 'numb' inside variable t to hold index number
              t._alpha = 75;//Set the Alpha value of the variable movie clip to 75% - for onRollOver highlight action
              thumbX += 55;//Increment thumbX value so next thumbnail is placed 125 pixels to the right of the one before
              t.onRollOver = function () {//define onRollOver event of the variable movie clip
                   this._alpha = 100;//Set thumbnail alpha to 100% for highlight
              t.onRollOut = function () {//define onRollOut event of the variable movie clip
                   this._alpha = 75;//Reset thumbnail alpha to 75%
              t.onPress = function () {//define onPress event of the variable movie clip
                   this._rotation += 3;//rotates thumbnail 3 degrees to indicate it's been pressed
                   this._x += 3;//Offset X coordinate by 3 pixels to keep clip centered during rotation
                   this._y -= 3;//Offset Y coordinate by 3 pixels to keep clip centered during rotation
              t.onReleaseOutside = function () {//define onRelease event of the variable movie clip
                   this._rotation -= 3;//rotate thumbnail back 3 degrees
                   this._x -= 3;//Reset X coordinate by 3 pixels to keep clip centered during rotation
                   this._y += 3;//Reset Y coordinate by 3 pixels to keep clip centered during rotation
                   this._alpha = 75;//Reset thumbnail alpha to 75%
              t.onRelease  = function () {//define onRelease function to load full sized image
                   this._rotation -= 3;//rotate thumbnail back 3 degrees
                   this._x -= 3;//Reset X coordinate by 3 pixels to keep clip centered during
                   this._y += 3;//Reset Y coordinate by 3 pixels to keep clip centered during
                   this._alpha = 75;//Reset thumbnail alpha to 75%
                   holder.loadMovie(fullURL[this.numb]);//Load full sized image into holder clip based on sub-variable t.numb, referenced by 'this'
         holder.loadMovie(fullURL[0]);//Initially load first full size image into holder clip
    x.load ("silk_paintings.xml");// path to XML file
    panel.onRollOver = panelOver;
    function panelOver() {
         this.onEnterFrame = scrollPanel;
         delete this.onRollOver;
    var b = stroke.getBounds(_root);
    function scrollPanel() {
         if (_xmouse<b.xMin||_xmouse>b.xMax||_ymouse<b.yMin||_ymouse>b.yMax) {
         this.onRollOver = panelOver;
         delete this.onEnterFrame;
         if (panel._x >= 740) {
         panel._x = 740;
    if(panel._x <= (thumbX-10))  {
              panel._x = (thumbX-10)
         var xdist = _xmouse - 830;
         panel._x += -xdist / 7;
    The xml:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <slideshow>
    <photo thumbs="thumbnails/i_brown_fairy.jpg"  urls="images/brown_fairy.jpg"  />
    <photo thumbs="thumbnails/i_blonde_fairy.jpg"  urls="images/blonde_fairy.jpg"  />
    <photo thumbs="thumbnails/i_flower_fairy.jpg"  urls="images/flower_fairy.jpg"  />
    <photo thumbs="thumbnails/i_red_fairy.jpg"  urls="images/red-fairy.jpg"  />
    </slideshow>
    Attached is a link to the file I made named "index".
    https://rcpt.yousendit.com/706233226/5e7b4fe0973dacf090b5cbae32c47398
    I would have liked to have included the following files but was limited due to "you-send-it" not uploading folders.  Files not included: [but functioning] : xml list - images [folder] - thumbnails [folder]
    Again, Thank you
    Dalen

    The issues with the buttons calling up the scrolling thumbnail panel have been resolved, as well as keeping the buttons in their hit state once clicked, thanks to Rob.
    Those that have been following this thread, or stumble upon it in their searches later, may appreciate to see the final solution to this particular issue.
    [Hopefully I will be able to update this thread with a url in the future to show the site in operation, which may help somebody with their project in the future if its set up similarly.]
    Alas, it would be nice if future versions of flash had a more direct, flexible, user friendly method for creating navigation.
    [We may see development beyond the flash ads which everyone seems to loathe... and more creativity with flash in terms of games, web interactivity, &  animation.
    Below are 2 sets of code:
    a] the first is located within the first frame of the first button, and has some extra variables in it that the additional buttons call upon...
    b] the second is the code applied to every other button.
    stop();
    fscommand("allowscale", false);//keep SWF display at 100%
    var x:XML = new XML();//Define XML Object
    x.ignoreWhite = true;
    var fullURL:Array = new Array();//Array of full size image urls
    var thumbURL:Array = new Array();//Array of thumbnail urls
    //  .......  CHANGE
    var thumbX:Number;// = 25;//Initial offset of _x for first thumbnail
    // make an array of all of the instance names of each button object...
    // only do this once
    var buttonsList:Array = new Array(shadesOfGrey, silkPaintings);
    shadesOfGrey.isLatched = false;
    // the rollover function... repeat for each button
    shadesOfGrey.onRollOver = shadesOfGrey.onDragOver=function ():Void {
         if (!this.isLatched) {
              this.gotoAndStop(2);
    // the rolloff function... repeat for each button
    shadesOfGrey.onRollOut = shadesOfGrey.onDragOut=shadesOfGrey.onReleaseOutside=function ():Void {
         if (!this.isLatched) {
              this.gotoAndStop(1);
    // the mouse press function... repeat for each button
    shadesOfGrey.onPress = function():Void  {
         resetAllButtons();
         this.isLatched = true;
         this.gotoAndStop(3);
    shadesOfGrey.onRelease = function():Void  {
         x.load("shadesOfGrey.xml");// path to XML file
         thumbX = 25;
    function resetAllButtons():Void {
         for (b in buttonsList) {
              buttonsList[b].isLatched = false;
              buttonsList[b].gotoAndStop(1);
    x.onLoad = function() {//Function runs after XML is loaded
         //  resets the position of the panel on each new load
         panel._x = 740;
         //  .......  CHANGE  removes the existing movieclips from the panel before any new load...
         for (c in panel) {
              if (typeof (panel[c]) == "movieclip") {
                   removeMovieClip(panel[c]);
         var photos:Array = this.firstChild.childNodes;//Defines variable for length of XML file
         for (i=0; i<photos.length; i++) {//For loop to step through all entry lines of XML file
              fullURL.push(photos[i].attributes.urls);//Each loop, adds URL for full sized image to Array fullURL
              thumbURL.push(photos[i].attributes.thumbs);//Each loop, adds URL for thumbnails to Array thumbURL
              //trace(i+". Full Image = "+fullURL[i]+"  Thumb Image = "+thumbURL[i]);
              var t = panel.attachMovie("b", "b"+i, i);//Each loop, Define local variable 't' as a new instance of 'b' movie clip, given unique instance name of 'b' plus the index number of the For loop
              t.img.loadMovie(thumbURL[i]);// Each loop, load thumbnail image from XML data into variable movie clip
              t._y = 0;//Set Y coordinate of variable movie clip
              t._x = thumbX;//Set X coordinate of variable movie clip based on variable thumbX
              t.numb = i;//Set sub-variable 'numb' inside variable t to hold index number
              t._alpha = 75;//Set the Alpha value of the variable movie clip to 75% - for onRollOver highlight action
              thumbX += 55;//Increment thumbX value so next thumbnail is placed 125 pixels to the right of the one before
              t.onRollOver = function() {//define onRollOver event of the variable movie clip
                   this._alpha = 100;//Set thumbnail alpha to 100% for highlight
              t.onRollOut = function() {//define onRollOut event of the variable movie clip
                   this._alpha = 75;//Reset thumbnail alpha to 75%
              t.onPress = function() {//define onPress event of the variable movie clip
                   this._rotation += 3;//rotates thumbnail 3 degrees to indicate it's been pressed
                   this._x += 3;//Offset X coordinate by 3 pixels to keep clip centered during rotation
                   this._y -= 3;//Offset Y coordinate by 3 pixels to keep clip centered during rotation
              t.onReleaseOutside = function() {//define onRelease event of the variable movie clip
                   this._rotation -= 3;//rotate thumbnail back 3 degrees
                   this._x -= 3;//Reset X coordinate by 3 pixels to keep clip centered during rotation
                   this._y += 3;//Reset Y coordinate by 3 pixels to keep clip centered during rotation
                   this._alpha = 75;//Reset thumbnail alpha to 75%
              t.onRelease = function() {//define onRelease function to load full sized image
                   this._rotation -= 3;//rotate thumbnail back 3 degrees
                   this._x -= 3;//Reset X coordinate by 3 pixels to keep clip centered during
                   this._y += 3;//Reset Y coordinate by 3 pixels to keep clip centered during
                   this._alpha = 75;//Reset thumbnail alpha to 75%
                   holder.loadMovie(fullURL[this.numb]);//Load full sized image into holder clip based on sub-variable t.numb, referenced by 'this'
         holder.loadMovie(fullURL[0]);//Initially load first full size image into holder clip
    // this one function scrolls the panel for all of the buttons, it gets the
    // size of the panel when the images are loaded by any given button...
    stroke.onEnterFrame = function() {
         if (this.hitTest(_xmouse, _ymouse, false)) {
              if (panel._x>=740) {
                   panel._x = 740;
              if (panel._x<=740-panel._width+mask._width) {
                   panel._x = 740-panel._width+mask._width;
              if ((panel._x<=740) && (panel._x>=740-panel._width+mask._width)) {
                   var xdist = _xmouse-830;
                   panel._x += -xdist/7;
    Of note is the change to how the movie clips are measured... this change in and of itself has really helped to make the thumbnail panels operation more efficient.
    Below is the script for each additional button: [Having issues with the forums not letting me post additional code, so I will put the remaining code in a reply below.]
    cont.

  • No thumbnail images when viewing pictures folder via desktop & screensaver

    When I go into system preferences and then Desktop & Screensaver I chose the pictures folder. It does not show any thumbnail images of any of the contents of my Pictures Folder, yet clicking on a blank area of space applies a desktop???? I have never seen this before anyone have any ideas?

    There may be some minor issue or glitch in the system; and perhaps even
    starting up in SafeBoot and using Disk Utility's repair disk permissions, then
    quitting the utility, and restarting normally may help repair this situation.
    Some file types, in some cases, may not appear in icon or thumbnail view;
    and there are a few image editor applications whose custom icon thumb-
    nail views actually appear as a generic icon w/o an image; but an original
    import from a camera will have the correct thumbnail captured by Finder
    and/or Preview (or iPhoto) by first-contact with the image from the camera;
    but Photoshop or other third party shareware or freeware may not show one.
    For a normal situation where a thumbnail image icon should be present:
    Open up a finder window and do like this: from Finder=View=Show View Options
    =Show Icon Preview. That will give you a thumbnail view of whatever document it is.
    You can select to do this setting for all windows
    Apparently your situation is different in that there may be a permissions or other
    issue going on in the system; so try routine maintenance and also see if the images
    are in the correct location for the system to see them. If the system is really messed
    you may have to consider repairing it; try booting from the native disk utility in OS X
    boot/installer disc, repair disk and repair disk permissions; then reboot using Startup
    Disk in the boot disc's utilities menu (in installer menubar) and immediately press &
    hold the Shift key on startup to engage SafeBoot; and re-repair disk permissions
    from the System's hard drive located Disk Utility to re-correct these permissions, as
    they will probably not be proper for the fully updated system running in the computer.
    Then restart normally.
    There may be file damage, so if that is discovered through additional troubleshooting,
    you may have to consider a new system folder, as in "Archive & Install" then update.
    Repair disk permissions between all update & install steps of system and other software.
    If you have and use a utility interface tool such as OnyX (runs free, is donationware) from
    Titanium Software, download from their site; and run all the checkbox items in Automation,
    and then restart the computer - or set its preferences to do that also, automatically - this
    may help general system health. It may not be able to fix something deeper in the system;
    but a third party disk utility such as DiskWarrior or Drive Genius2 may help in other matters.
    In some cases, depending on what images are involved and where they came from, be
    they a chosen set of personal images you've directed the system to use as background
    desktop images in Finder, or a set of Apple-supplied images, the results can be different.
    I use a folder of camera created scenics as desktop backgrounds and use ToyViewer to
    edit and rotate at a most basic level, since I try to make photos in the camera and not edit.
    Sometimes, these will have generic non-image icons and not thumbnails; there is a way
    to work around the issue should a whole folder of them go bad or change over w/o notice.
    Hopefully someone who has fixed this problem will write a follow up; it is getting late in my
    timezone and I am running on empty per this topic, among others... You may resort to an
    Apple help or Apple Support documents search for a matching topic. That's a huge library.
    Good luck & happy computing!

  • Increase size of thumbnail images in camera roll

    hi, is there a app available which will increase the size of the the thumbnail images while scrolling images in the camera roll, I want to see 6 or 8 images on the screen per view. The default is approx 30 images 

    I'm not aware of any app that would help but you might want to make the suggestion to Apple that they add an option for larger sizes in a future release: https://www.apple.com/feedback/ipad.html

Maybe you are looking for

  • Short Dump while Complete deletion of data Contents from a Cube.

    Hello Experts, I am facing a runtime Short dump whenever i attempt to delete data from a Cube. Shown Below:- Runtime Errors         MESSAGE_TYPE_X Error analysis     Short text of error message: Data request to the OLTP     Long text of error message

  • Interface Mapping not found error

    I'm getting "Interface Mapping <name> (SWCV=<id>) not found" error during runtime. I did not do anything to the specified interface mapping. If I go into the repository and put into modify mode, add space to description, save, activate, it all works

  • Why can't we download adobe flash player

    I have tried to download adobe flash player because I need help with my mobile. I then tried to download it but I wasn't allowed.    WHY?

  • WLC 5508 Local Authentication- need guidance

    Hi formers' i have the combo of WLC 5508 (ver 7.0) and AP1041n, just want to ask how i can do local authentication. The environment don't have ACS, no directory services ( AD or LDAP). Requirement: say, i have one WLAN name "admin". Where-ever if use

  • Form translation problem

    Hi experts, I'm having the following problem: I created an Interactive Form in WDA. The default language is 'enUS'. I want to translate the form to other languages, so I selected 'goto'-->'translation' and selected nlNL (dutch) as target language. Af