Jagged edges after rotation

Hi Everyone,
I am try to rotate an image and put it on a background image. Image is being rotated successfuly but jagging appears if i use an small angle to rotate. I am also setting the Antialiasing using Rendering hints...
Please respond.
Thanks,
Masood
Following is the Code:
RenderingHints renderHints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_DEFAULT);
renderHints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
int value = 5;
int angle = (float)(value * (Math.PI/180.0F));
out = new BufferedImage(bsrc1.getWidth(), bsrc1.getHeight(), BufferedImage.TYPE_INT_RGB);
Graphics2D g2 = out.createGraphics();
g2.setRenderingHints(renderHints);
//draw bg image
g2.drawRenderedImage(bsrc1, null);
at = AffineTransform.getTranslateInstance(width1+86-34,height1-30);
at.rotate(angle,612/2,486/2);
g2.drawRenderedImage(bsrc2,at);     
g2.dispose();

It's not an antialiasing process, it's interpolation. Try setting the interpolation key to bilinear or bicubinc - though the results still won't be ideal.
If that's not good enough then what you could do to get a fully smooth edge, if you're prepared to lose a pixel or two round the edge, is this:
- rotate the image
- create a quarilateral Shape which forms a rectangle around the new four corners
- turn on antialiasing
- using a stroke the same colour as your background, with a width of say 2 pixels, render the shape
This should give you a smooth edge but, as I say, you will lose a pixel or so round each edge, which may or may not be acceptable.

Similar Messages

  • Jagged Edges after rotating a stroked image

    I've have this problem a lot but I guess I'm just now getting around to ask about it.
    When I have a  photo in cs2-cs3-cs4 etc and I rotate it at an angle I get fine jagged edges all along the sides. It's becomes very pronounced in a stroked image even when I I stroke the image after rotation. The problem is more obvious when the image is not at angles like 45 or 90 degrees but more visible at in between angles.
    Any suggestions?

    ryanroy.roy wrote:
    I've have this problem a lot but I guess I'm just now getting around to ask about it.
    When I have a  photo in cs2-cs3-cs4 etc and I rotate it at an angle I get fine jagged edges all along the sides. It's becomes very pronounced in a stroked image even when I I stroke the image after rotation. The problem is more obvious when the image is not at angles like 45 or 90 degrees but more visible at in between angles.
    Any suggestions?
    What you are seeing is alaising, and it is inherent in raster graphics when the line to be shown is not parallel to the columns or rows of the image.It can be mitigated to some extent by antialaising, which softens the edges of the diagonal lines. When you select all of an image and stroke for a border, antialaising is used. With the polygonal lasso tool, you can turn antialaising on or off. Alaising is less apparent with very high resolution, but it can't be elilminated.
    Here are triangular selections with antialaising turned on and off:

  • How do I remove white jagged edges after making image transparent?

    How do I remove white jagged edges after making image transparent?  Is there a feature to help out with this?

    It's a file format limitation. GIF supports 1 bit of transparency.  That is 2^1 (which equals 2 total) levels of transparency.  This equates to either NO transparency at all, or specifying 1 single color of the 256 total possible values to being fully transparent.
    This will leave a very ugly fringe around the edge no matter what; it will only not be visible in color that match or are close to the fringe color; and then, that's a perception issue.
    Try creating an alpha channel and saving the image as a PNG.  That supports 8 bits of transparency, which equals 2^8 or 256 total different levels of transparency.  This will let your image have very smooth edges with no jagged transitions.

  • Jagged edges on rotated text in Flash

    Does anyone have a good solution for getting rid of jagged edges on rotated text? I have tried the anti-aliasing options but nothing seems to change the jaggedness.
    Any advice is apprecitated.
    Thanks!

    I don't know if this is the problem, but I've seen some display anomalies when using the scroll wheel on the mouse (typically sideways scroll, but it happens with vertical sometimes, too). I know Logitech mice are affected, but I don't believe it's resticted to just the Logitech mice. Im most cases switching to the Hand tool (use the keyboard shortcut Alt/Opt + Spacebar to access it temporarily) and clicking will clear things up again, sometimes for the rest of the editing session. When I see this, though, it affect all pages not just one.
    Does the type clear if you restart ID and reopen the file?

  • Images have jagged edges when rotated in Keynote 6.1

    After upgrading to Keynote 6.1, I'm having problems when rotating images that I've imported to my slides. Any time I rotate an image that's not on a 45, 90, 180 angle, the image has jagged edges.
    Here's a screenshot as an example. The image is on 4 degree angle.
    Any ideas?

    Sorry, in haste I forgot to mention this also:
    Use an appropriate slide size, as a minimum resolution I match the slide size (Keynote > Inspector > Setup Slide Size), to the resolution of the display I am using, in my case 1920 x 1200.
    I always resize the images I bring into Keynote with the same pixel resolution as the slide size.

  • Why is my rendered color corrected movie pixelated with jagged edges after rendering?

    Hello All,
    I am new short film movie producer and have just started using Adobe Premiere CS6 and Audition CS6.  Comparing my flat footage before adding it to a sequence and color correcting it and rendering it, it looks fair.  But after all these transitions it now looks pixelated along with very jagged edges.  This is my first short film for my first client and I am at my witts ends!  I have tried to copy the sequence and transfer it to a new sequence with differnt settings comparing the pixel aspect ration, fps, trying to match the clips specs and I am so stuck. Can anyone please offer any suggestions or let me know if there are procedures I have overlooked.  Thanks Adobe Community.
    Michael Diaz

    Let's back up a step - what camera do you use? If it's an HDV model, then yes you have anamorphic footage. Simply choose an HDV sequence preset to match. If your camera shoots 720p or full 1920x1080, those are square pixel (1.0) formats and are not anamorphic (anamorphic does NOT mean widescreen, it means "stretched to widescreen" basically).
    In any case, drag a clip to the New Item button for best results until you get more educated and confident about the different formats you may be working with.
    If you copied and pasted the contents of the SD sequence into an HD sequence, all filters and effects you had applied before should remain intact and not need reworking, except possible for titles and things involving scaling (since the size has changed).
    As for exporting, you typically will NOT want an anamorphic export, except for widescreen DVD. You will not see anamorphic mentioned though, just choose "MPEG-2 DVD" and an appropriate widescreen preset and Adobe knows what to do from there. For web/computer viewing, best to avoid anamorphic footage, since many players assume 1.0 PAR and do not adjust the image for non-square pixels. So if working with 1440x1080 footage, and exporting to web or YouTube for instance, export as 1920x1080 (1.0) or 1280x720 (720p) so the viewer sees the proper 16:9 output, or the image may be squished otherwise!
    Thanks
    Jeff

  • Horizontal jagged edges after compression

    I am new to Prores and compressor and have done a lot of reading on workflows. I think I have it set up correctly but am not getting the results I expected. I am shooting 1440x1080 60i HDV with an FX1. I have FCP setup to use a Prores 422 1440x1080 60i 48khz sequence capturing with Prores 422 1440x1080 60i 48khz from an HDV tape. It looks fine in FCP. I send the sequence to Compressor 3.5 and am using the standard Apple DVD Best quality 90 min setup (it's only about 60 min of footage). After it compresses I put it into DVDSP setup for 16:9 SD DVD. When I build and burn it with Toast Titanium the playback looks bad. It has horizontal jagged edges around peoples' shoulders, faces, background etc. When I look at the inspector for the clip in compressor it looks like deinterlacing is on, but I haven't checked the deinterlacing option.
    Is there something I'm missing? From everything I've read this seems to be the way I should be capturing and compressing. Thanks!

    Sorry. I am building with DVDSP. I'm using Toast to burn the final dvd. I tried burning a disc with DVDSP and I didn't get any video for some reason, only audio.
    Unfortunately the only way for me to view the material until it is burned is on my main monitor.
    So if I don't turn on the deinterlace option in DVDSP my final product should be interlaced, correct?

  • Jagged edges on rotated picture boxes

    It seems as though it's a bug. As I rotate imported images the outer edge and hard edges in the actual images are noticably jagged. As in the example. Any suggestions?

    Agreed, but there's more to it. If an image is opaque and unrotate it can be output as a JPEG. If that same image is rotate 5 degrees, the current Muse output will still be an unrotated image, but with the original image rotated 5 degrees within the new image. However, the new image now has transparent areas and thus must be a PNG and will be ~5 times larger than the original JPEG. That means slower page load times.
    The preferred approach (and our plan) is for Muse to move to using CSS to accomplish the rotation. This will allow the original JPEG to be downloaded since the browser will be performing the rotation. However, the quality of the resulting image in the browser will depend on the quality of the rotation algorithm the browser is using.
    So, even once Muse has changed to use CSS for the rotation, it will still be up to you to decide whether you want the quality of pre-rotating images prior to placing them into Muse and the slower page load times associated with PNG images, or whether you want faster page load times and image display quality that will vary from browser to browser. We may at some point offer this option from within Muse, but it's relatively far down on the priority list at the moment.
    Regarding re-linking, right-click on the image in the Assets panel and choose "Relink..."

  • Jagged edges after adding 3d effect

    I created a logo in Illustrator and sent it to the printer to print some business cards. They sent it back saying the edges of the 3D word look jagged and won't print well. What can I do to fix this? He says it's low res. But it's a vector, so it can't be low res. Thanks.
    julie

    It's not necessarily a vector path.
    Is there a yellow triangle in the options of the 3D effect? Then something has been converted to pixels.
    You'll need to set the raster effects resolution appropriately in that case. Use Effect > Document raster effects setting

  • Why do button highlights suddenly have jagged edges after a test burn, especially for round buttons?

    Hi, I would like to know how to make menu buttons look perfect when they are highlighted.
    Some tutorials I found say that I have to create menus in HD first, then from that Encore would render it to the right size or dimensions. I tried that route as well but still I got the same results.
    Buttons look really good on Encore preview but after doing a test burn and playing the disc, I get poor quality buttons that look jaggedy, especially for the round buttons.
    Any kind of advice or help would be very much appreciated. Thanks.

    DVD spec, highlights are limited to 2 bit indexed color. You have probably applied effects to them or used more forgiving color.
    Also, the HD to SD downrezzing creates problems for detail that does not have enough pixels left in the SD size.

  • Jagged edges on text

    My text has jagged edges after I render in FCP 4.5. This also happens when I import files from After Effects and Live Type. I recently lost all of my sequence and render settings, so my thinking is that it's one of those settings. Any ideas?

    By default FCP sequences are in the DV codec which looks as if it loses resolution when viewed on a computer monitor. If you're outputting your video to an NTSC monitor via firewire, DV should look fine ... you must be looking in the Canvas.
    (DV doesn't really lose much resolution on computers ... if you open a DV video file in Quicktime & go to Movie Properties-->Video Properties, you can select "High Quality." The Powers That Be at Apple so ordained this setup because computers used to have trouble playing back full-resolution video at 29.97 fps ... not really the case nowadays but they keep playing DV at "low quality" by default.)
    If you change your sequence codec to Animation it will look sharp & crisp. But be careful, Animation files will eat up space on your scratch disk like CA-RAAAAAAZY. So either you need oodles of space or short animations.
    Message was edited by: Caillera

  • Jagged Edges on Raster Images in After Effects/Encore

    I've been working on a project that uses movie files made in After Effects and then brought into Encore to create a DVD. The problem I'm having is jagged edges appearing on raster photo images - things like people's chins especially look jagged. All looks ok on my monitor/computer, but once I watch it on my flat screen TV I get these jagged edges. I've tried transcoding Progressive in Encore but that didn't help.
    Someone please help me!!!

    Yes, it's MPEG compression, and no, there is no "flip a switch" magic cure. Probably what happens is:
    - you are not suitably color correcting your image, resulting in oversaturationthat's bad for compression
    - you have thin lines and only slightly angled edges on the photos
    - you are not using motion blur
    - you have overcranked our TV's colors
    - the TV does some image processing/ scaling/ frame rate coversion
    These ad a million other things will conribute to percception of poor video, but as I said, geerally there is no simple solution here. Compression isunavoidabl, but there are of course ways to improve the results. You should do a little reading up on this. O the AE side you may improved by choosing suitabe renderr settings, using a tiny bit of blur, enabling motion blur, chnaging the motion of the items, adjusting their colors - whichever works. Again, no geeral recipe here. Good compression is a art we all have had to learn over the years ad the best advise can't replace persoal experience.
    Mylenium

  • 'jagged edges' due to interlacing after editing with 2 cams. How to remove?

    I just finished a project in FCE, combining footage from a Sony HVR-Z7 and a Canon HV30. As the shooting itself took place some time ago, I'm not sure if the Canon was in 'plain HD' (which means interlaced, I presume) or in '25 pf', (which means Progressive), but I'm afraid it was in 'interlaced' mode. The Sony was certainly in Progressive mode. After lengthy editing, the finished movie looks perfect on a computer monitor, but on my plasma tv I get jagged edges in the Canon HV30-images. Not all of the time, though. Can this be corrected in the edited sequence in any way? I don't want to start all over again...

    Does it look like this on the sloping back of the car?
    I have only discovered 2 ways of getting rid of it.
    1. Down-convert your HDV to DV in the camera as you are capturing and edit in a DV sequence or
    2. Edit as AIC and then drag your edited AIC sequence into a new DV sequence. Do not alter anything but render it (which takes a long time) and then File>Export>QT Movie.
    P.S. My videos are not blurred. If I remove the blur in the picture, the jagged edges disappear!

  • When rotating a simple black rectangle, jagged edges are created. How can I fix this? (for web)

    I have been messing with a simple black rectangle and when I transform it, jagged edges appear. This is the base for a logo for web. I have anti-alising checked in pref. The logo looks horrible and blurry/jagged on the edges even when previewed on several screens from pc to mac. Any suggestions are welcome!
    p.s. this is also happening with text, that has been made an object (top of text seen in the rectangle.)

    I don't see anything unusual. That's the best anti-aliasing you can possibly get. Have you seen another black on white hard edge at the same angle that looks better? When comparing raster images make sure you view all of them at screen resolution which is 100% zoom.
    Obviously anti-aliasing of horizontal and vertical lines is the best followed by 45° angles and at your angle it is one of the worst because with this angle you have less pixel lines to render it on the pixel grid of the screen. Also the pixels of each monitor screen are different sizes and if you happened to be viewing it on screens with relatively larger pixels the aliasing will be more noticeable.

  • Jagged Edges on Images in Dreamweaver CS3

    When placing an image with a transparent background in Dreamweaver CS3, I keep encountering ugly jagged
    edges, whether I save the image as a .png or a .gif.  I've tried everything I can think of to eliminate this problem,
    and still the same results.
    The only thing that has worked to eliminate the jagged white edge has been to place a background layer behind the image,
    but that poses yet another problem because the hex colors in Photoshop and Dreamweaver will not match either.
    Frazzled!!  Somebody please help!

    That's not a problem with DW. The jagged edge you see on your phone image is a jagged edge on your phone image!
    I got a bit of a better result after about 5 minutes fumbling with the eraser in Photoshop:
    http://www.martcol.co.uk/test/phone.html
    It shouldn't take too much to get your original good enough to lose that jagged edge.
    Martin

Maybe you are looking for