How to make rounded corners in spry image slideshow

It says it can do it using slices but there are no great instuctions anywhere to be found with detail on how to do it.
Any body know whixh file and what part of the code to change so the frontend on the website the corners are rounded?

import java.awt.*;
import java.awt.geom.RoundRectangle2D;
import java.awt.image.BufferedImage;
import java.io.*;
import javax.imageio.ImageIO;
import javax.swing.*;
public class RoundingImages extends JPanel {
    BufferedImage image;
    RoundingImages(BufferedImage src) {
        image = roundCorners(src, 50);
    private BufferedImage roundCorners(BufferedImage src, int r) {
        int w = src.getWidth();
        int h = src.getHeight();
        int type = BufferedImage.TYPE_INT_ARGB;
        BufferedImage dst = new BufferedImage(w, h, type);
        Graphics2D g2 = dst.createGraphics();
        RoundRectangle2D r2 = new RoundRectangle2D.Double(0,0,w,h,r,r);
        g2.setClip(r2);
        g2.drawImage(src, 0, 0, this);
        g2.dispose();
        return dst;
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        int x = (getWidth() - image.getWidth())/2;
        int y = (getHeight() - image.getHeight())/2;
        g.drawImage(image, x, y, this);
    public static void main(String[] args) throws IOException {
        String path = "images/cougar.jpg";
        BufferedImage image = ImageIO.read(new File(path));
        RoundingImages test = new RoundingImages(image);
        JFrame f = new JFrame();
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.getContentPane().add(test);
        f.setSize(400,400);
        f.setLocation(200,200);
        f.setVisible(true);
}

Similar Messages

  • How to make rounded corners of the image?

    Hi,
    I have arbitrary images which i need to change in the following way.
    1. Make the corners of the images a little bit rounded
    2. Pixels must be transparent such that the background can be seen.
    Thanks.

    import java.awt.*;
    import java.awt.geom.RoundRectangle2D;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    public class RoundingImages extends JPanel {
        BufferedImage image;
        RoundingImages(BufferedImage src) {
            image = roundCorners(src, 50);
        private BufferedImage roundCorners(BufferedImage src, int r) {
            int w = src.getWidth();
            int h = src.getHeight();
            int type = BufferedImage.TYPE_INT_ARGB;
            BufferedImage dst = new BufferedImage(w, h, type);
            Graphics2D g2 = dst.createGraphics();
            RoundRectangle2D r2 = new RoundRectangle2D.Double(0,0,w,h,r,r);
            g2.setClip(r2);
            g2.drawImage(src, 0, 0, this);
            g2.dispose();
            return dst;
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            int x = (getWidth() - image.getWidth())/2;
            int y = (getHeight() - image.getHeight())/2;
            g.drawImage(image, x, y, this);
        public static void main(String[] args) throws IOException {
            String path = "images/cougar.jpg";
            BufferedImage image = ImageIO.read(new File(path));
            RoundingImages test = new RoundingImages(image);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(test);
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    }

  • How you make rounded corners

    Hello
    How you make round corners to the form when i use a div in dreamweaver cc i have try this but only the div change
    Thankes

    Sorry you can't change the style of the FormsCentral HTML form. The form is put in an iFrame inside you div and since the content of the iFrame is not coming from your server you can't modify it.
    I found this thread online that you might want to look at :
    http://stackoverflow.com/questions/583753/using-css-to-affect-div-style-inside-iframe
    Gen

  • How to make rounded corners on webpages

    Hi, I am using DW8, an intermediate level user with html and
    tables, not good with php, java, or any programming language, on
    winXP home.
    One thing that I've seen and like are webpages that have
    rounded corners on them. For example, the page itself can be 80%
    the width of a page, but instead of the regular square corners,
    there are rounded ones.
    Can anyone tell me how to do that?
    thanks

    You could do it the old fashioned way with a 3 x 3 table and
    9 image slices.
    Or, with CSS and 3 image slices.
    http://alt-web.com/Image-slices-in-a-CSS-based-layout.html
    Or one of these:
    http://www.cssjuice.com/25-rounded-corners-techniques-with-css/
    Nancy O.
    Alt-Web Design & Publishing
    www.alt-web.com
    www.twitter.com/altweb
    www.alt-web.blogspot.com/

  • Well how I make Rounded Table Corners (html) ?

    I use dmwr mx 2004 , well how I make Rounded,Table,Corners
    (html) ? CSS TABLES can be with Rounded Corners ?

    On Wed, 12 Dec 2007 16:40:01 +0000 (UTC), "123polis123"
    <[email protected]> wrote:
    >I use dmwr mx 2004 , well how I make
    Rounded,Table,Corners (html) ? CSS TABLES can be with Rounded
    Corners ?
    No - you have to use images.
    as already said - just google for more info
    http://www.google.co.uk/search?hl=en&q=round+corners+on+websites&btnG=Google+Search&meta=
    ~Malcolm N....
    ~

  • Rounded Corners for Spry menu bar

    Can I use css to style spry menus to make rounded corners?
    Tried inserting a background image into the menu cell in css but
    didn't work. Found tutorials to make rounded corners on text boxes
    but nothing specific to spry menus.
    Also can I make the drop down menu drop "up" rather than
    down?
    Thanks!
    Stacey

    Excellent, Massimo! Nice to see you here again.... 8)
    Happy Christmas to you over there in chocolate land.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Massimo Foti" <[email protected]> wrote in
    message
    news:gi5rie$puf$[email protected]..
    > Spry's Menu Bar is a pretty good widget, but it ships
    with a somewhat lame
    > CSS. You can download a set of skins that mimic Office
    2003 look and
    > feel:
    >
    http://www.massimocorner.com/spry/menubar/
    >
    > I hope it will inspire people to share more skins
    >
    >
    > --
    > ----------------------------
    > Massimo Foti, web-programmer for hire
    > Tools for ColdFusion, JavaScript and Dreamweaver:
    >
    http://www.massimocorner.com
    > ----------------------------
    >
    >
    >
    >

  • How to get rounded corners for Grid in flex 3.0

    Hi All,
    I was trying to make rounded corners for ‘Advanced Datagrid’ and ‘Datagrid’ components of Flex 3.0. But was unable to do so.
    Also  tried searching the net for some solution but didn’t get much help for the problem.
    I tried making a skin and applying it , but still wasn’t successful.
    Can you please guide me in making the corners rounded for the 2 components.
    Thanks
    RSI
    e.g of my code
    <mx:AdvancedDataGrid id="myADG"
    headerBackgroundSkin="com.coresecurity.ui.view.skin.RoundImageSkin"  dataProvider="{dpFlat}"
            width="100%" height="100%">
            <mx:Columns>
                <mx:AdvancedDataGridColumn headerText= “1” dataField="1"/>
                <mx:AdvancedDataGridColumn headerText = “ 2” dataField="2"/>
                <mx:AdvancedDataGridColumn dataField="3"
                    headerText="3"/>
            </mx:Columns>
       </mx:AdvancedDataGrid>
    RoundImageSkin.as
    public class RoundImageSkin extends RectangularBorder
    public RoundImageSkin(){
    super();
    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
    var cls:Object = getStyle("backgroundImage");
    var bmp:Bitmap = new cls();
    graphics.clear();
    graphics.beginBitmapFill(bmp.bitmapData);
    graphics.drawRoundRect(0, 0, unscaledWidth, unscaledHeight,5);

    You aren't likely to get any of your questions answered for the reasons you already identified, and I imagine you would not find a tutorial for something as complex as what you are prusuong..  You need to learn how to design with Flash, and a forum is not a place where you are going to get that kind of help.  If you have code and/or a design issue that you need help with then that's where a forum might be of use to you.

  • Rounded Corners in SPRY

    Hi there, first Im well aware I can create what im looking for in Photoshop, Flash or Fireworks, however the text looks distorted so here i am to see if I can acive what I am looking for in Spry.
    You can view my menu bar at the following link http://www.helpvid.net/ what Im looking to do is have either end of the navigation bar rounded corners.  So to the left of the home link and to the right of the contact link.  Ive been messing around with it and it seemes to apply the change to every section, is there anything i can do in spry so each end of the nav bar has rounded corners.

    Just thought I would update this thread with a few Images to give a visual refrence.
    This is my spry menu bar
    This is what I am trying to achive (rounded corners in spry)

  • HOW TO MAKE ROUND BUTTON

    HI PLS TELL ME HOW TO MAKE ROUND BUTTON ON FORM.

    Rounded end buttons (e.g. Oracle Look and feel) are do-able in both 6i and 9i using PJCs in the 9i demos see the rollover button example, in 6i I seem to remember that there is a RoundedButton sample in the demos.
    Both sets of demos can be downloaded from http://otn.oracle.com/products/forms.
    If you want circular buttons then you'd have to use an Image for that.

  • How do I link web pages in a Spry Image Slideshow using Dreamweaver CS5?

    I have used the Widget Browser to create the spry image slideshow and would like to link the large image displayed to a webpage? Is there any code or easy way to link the slideshow images to webpages?
    Thanks in advance for any help!

    Hans-G; thanks for the code. I am not sure where to place the code. When I insert the widget spry image slideshow, I get the following below. Where shall I place the code, thanks again:
    <ul id="ImageSlideShow_3" title="Donald Booth Photography">
      <li><a href="http://labs.adobe.com/technologies/spry/ui/images/dbooth/images/photos-1.jpg" title="White Orchids"><img src="http://labs.adobe.com/technologies/spry/ui/images/dbooth/thumbnails/photos-1.jpg" alt="photos-1.jpg" /></a></li>
      <li><a href="http://labs.adobe.com/technologies/spry/ui/images/dbooth/images/photos-10.jpg" title="Sand"><img src="http://labs.adobe.com/technologies/spry/ui/images/dbooth/thumbnails/photos-10.jpg" alt="photos-10.jpg" /></a></li>
      <li><a href="http://labs.adobe.com/technologies/spry/ui/images/dbooth/images/photos-11.jpg" title="Tree"><img src="http://labs.adobe.com/technologies/spry/ui/images/dbooth/thumbnails/photos-11.jpg" alt="photos-11.jpg" /></a></li>
      <li><a href="http://labs.adobe.com/technologies/spry/ui/images/dbooth/images/photos-12.jpg" title="Canon"><img src="http://labs.adobe.com/technologies/spry/ui/images/dbooth/thumbnails/photos-12.jpg" alt="photos-12.jpg" /></a></li>
      <li><a href="http://labs.adobe.com/technologies/spry/ui/images/dbooth/images/photos-13.jpg" title="Door"><img src="http://labs.adobe.com/technologies/spry/ui/images/dbooth/thumbnails/photos-13.jpg" alt="photos-13.jpg" /></a></li>
      <li><a href="http://labs.adobe.com/technologies/spry/ui/images/dbooth/images/photos-14.jpg" title="Flowers at the Palace of Fine Arts"><img src="http://labs.adobe.com/technologies/spry/ui/images/dbooth/thumbnails/photos-14.jpg" alt="photos-14.jpg" /></a></li>
      <li><a href="http://labs.adobe.com/technologies/spry/ui/images/dbooth/images/photos-15.jpg" title="Palace of Fine Arts"><img src="http://labs.adobe.com/technologies/spry/ui/images/dbooth/thumbnails/photos-15.jpg" alt="photos-15.jpg" /></a></li>
      <li><a href="http://labs.adobe.com/technologies/spry/ui/images/dbooth/images/photos-2.jpg" title="Orchid Close Up"><img src="http://labs.adobe.com/technologies/spry/ui/images/dbooth/thumbnails/photos-2.jpg" alt="photos-2.jpg" /></a></li>
    </ul>

  • Spry Image Slideshow does not work in Explorer

    My spry image slideshow works fine in Safari and Firefox, but does not work in Explorer.
    A small box shows up in IE 8, and absolutely nothing shows up in IE 7.
    www.epaaudio.com
    Any Suggestions?

    How did you get your slideshow to play in Internet Explorer? I'm using the same slideshow on my new website and it plays fine in everything but IE versions. Here's a test page I'm working on... http://4034.sandbox.i3dthemes.net/oceankayakbanzai.html
    I looked at the code for your page and didn't notice anything different on mine. But yours works... Let me know if you have any suggestions. Thanks!

  • SPRY Image Slideshow, compatibility problems with IE

    Hello, i recently used the Spry image slideshow in my website. All works great in every browser except IE. I could actually get it to work when i changed the DOCTYPE from: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> TO: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
    BUT,
    that totally skrewed the rest of my content. also i added the meta tag: <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >  and that fixed the slideshow, but again skrewed my content.
    Has anyone found a solution? i looked through past discussions but couldnt find one.

    mdr4win wrote:
    i dont think you understood my question, wasnt about body background, but abut the spry image slideshow to work properly in IE
    I was not talking about body background, but about having markup that screws up your document when using a browser. Body background just happened to be there. Perhaps you would do well to have a look here http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Flittletreats.org%2F.
    I have noticed that you ignored my solution; your document still shows two bodies.
    Perhaps I should have mentioned that I tested in IE6 through to IE9 using IETester and the above was the only thing stopping IE from performing properly.
    How did you determine that the slideshow was not working correctly in IE and which versions of IE?
    Grumps

  • Spry Image Slideshow - Large gap at top

    My page layout has a main div with a left-floating column containing the menu and a few other bits and pieces.
    The layout is the same for all pages.
    When I insert the Spry Image Slideshow widget into the main div it leaves a space of around 400px above the slideshow.  The pause and continue buttons appear in this space when the mouse is hovered over it.  There is no other content in the main div on this page.
    All other content on other pages, whether text or images or a combination of both start, as expected, just inside the main div top margin.
    I'd appreciate any suggestions please?

    I am unable to reproduce your problem I inserted Spry Slideshow w/ FilmStrip into a test page with a div with your #bodyCenter id applied to it and it works fine for me.  I used BrowserLabs to preview it in 7 different browser on Mac and Windows.
    Make sure that you have uploaded all of the dependent .js and .css files to your site.  Send a url if you are still having problems.
    Here is my working sample with your css div:
    http://srichards.host.adobe.com/SprySlideShow.html

  • Spry Image Slideshow problems with IE?

    I have set up the Spry Image Slideshow widget and it works beautifully in Firefox and Chrome.  I'm having the same problems others have had.  I've read through the various discussions on here and have sorted some of them but am still stumped on a couple things!
    Here is the link to where I have it currently uploaded for testing purposes:  www.wohowebdesign.com/sidestrand/gallery.php
    My first problem was how the images just would not flow, skip all over and freeze.  After I changed the DOCTYPE, this problem was gone.
    My Second problem is now the images are blending ok, but when you go to use the controls to pause or click the arrows, a vertical line appears and does not go away. This is still occuring on my local computer tests, but the uploaded version seemed to work itself out... I have no idea how!!
    My third problem is the alignment of the whole gallery box will not line up properly on the page.  It is shifted to the right and this only happens when I view it in IE8 (not Firefox or Chrome).  Unfortunately most of our school uses IE8 so I need to have it working perfectly before I put the new site live.
    Any help or suggestions are greatly appreciated!
    Thank you,
    Debbie

    mdr4win wrote:
    i dont think you understood my question, wasnt about body background, but abut the spry image slideshow to work properly in IE
    I was not talking about body background, but about having markup that screws up your document when using a browser. Body background just happened to be there. Perhaps you would do well to have a look here http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Flittletreats.org%2F.
    I have noticed that you ignored my solution; your document still shows two bodies.
    Perhaps I should have mentioned that I tested in IE6 through to IE9 using IETester and the above was the only thing stopping IE from performing properly.
    How did you determine that the slideshow was not working correctly in IE and which versions of IE?
    Grumps

  • Spry Image Slideshow works locally but not live!?!?

    I am new to the whole website creation. I used the Spry Image Slideshow widget from the widget browser and everything works perfectly when I tested it locally. However, once i uploaded to the server and tested the links I get errors stating that it cannot locate the .js files. Like stated, I am very much new to this and have no idea how to fix this problem. Has anyone else ran into this or know of a solution?
    My website address is www.terranceperdue-architecture.com and the links in question are on the portfolio link.
    So more specifically:
    http://www.terranceperdue-architecture.com/Design%20Studio%201.html
    Any help would be greatly appreciated as I am hoping to use this website to gain an internship for the summer. But if it is not working then that is not an option.
    Thanks for any and all insight.
    -Terrance

    I see where you have posted that you got your slideshow to work, but I do not see any of the reponses on how you did it. I am having the same problem when I test my slideshow locally on dreamweaver it works, but it does not work when I upload it to the internet. It doesn't give me any error, but all it does is show me a black box with a spinning play button like it is trying to load. It doesn't do anything else. I have tried looking at IE, Safari, and Firefox and I get the same thing on all of them.
    Thanks,
    Christin

Maybe you are looking for