How to transform a text to a graphic?

if that is possible,can you give me some tips or a sample?
thanks in advance.

I really want to save a special text to a Image,just
like text "dobetter"-> dobetter.jpg ,
what can i do next?To save a java.awt.image.BufferedImage to a file: use javax.imageio.ImageIO.
To put text onto a BufferedImage: render onto its Graphics2D object:
Demo:
import java.awt.*;
import java.awt.font.*;
import java.awt.geom.*;
import java.awt.image.*;
import java.io.*;
import javax.imageio.*;
import javax.swing.*;
public class X {
    public static void main(String[] args) throws IOException {
        String text = "Hello World";
        Font font = new Font("Lucida Bright", Font.PLAIN, 64);
        FontRenderContext frc = new FontRenderContext(null, true, true);
        Rectangle2D bounds = font.getStringBounds(text, frc);
        int w = (int) Math.ceil(bounds.getWidth());
        int h = (int) Math.ceil(bounds.getHeight());
        BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
        Graphics2D g = image.createGraphics();
        g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
        g.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
        Paint paint = new GradientPaint(0, 0, Color.GREEN, 10, 10, new Color(0, 128, 0), true);
        g.setPaint(paint);
        g.setFont(font);
        g.drawString(text, -(float)bounds.getX(), -(float)bounds.getY());
        g.dispose();
        ImageIO.write(image, "jpeg", new File("hello.jpeg"));
}

Similar Messages

  • How to transform a text variable in PLD to all CAPS?

    Dear Experts,
    I have a text variable in my PLD and I will like to change this text to all upper case?
    What is the function I can use to achieve this in PLD?
    Warmest Regards,
    Chinho

    Hi Chinho,
    PLD is a basic tool without the function you asked for.  If you click on Formula Editor, you will find only less than 10 string operations are supported. You may use UDF with FMS by Upper function from SQL to achieve your goal.
    Thanks,
    Gordon

  • I created a 5x7 postcard document in Word with text boxes and graphics.  When I converted it to PDF, some of the items were missing, even though they were in the boundaries of the page and looked fine on the Word document.  What happened, and how do I fix

    I created a 5x7 postcard document in Word with text boxes and graphics.  When I converted it to PDF, some of the items were missing, even though they were in the boundaries of the page and looked fine on the Word document.  What happened, and how do I fix it?  I'm trying to upload the PDF version to Vistaprint.  Thanks.

    Reader doesn’t create pdf files. You can use Acrobat (ask in that forum) to create pdfs. You can subscribe to the Adobe PDF Pack which has a create pdf functionality (please ask in that forum), or you can use a third party utility such as ghostscript, cutepdf, or Microsoft’s own PDF creation capability. For third party pdf creation you will need to ask in a forum dedicated to that software as fellow users of Reader are unlikely to have the knowledge to help.

  • How can I put text on top of a graphic in Framemaker 11?

    I am using Framemaker 11. When I import an image from Photoshop (EPS file) and put a text box on top, I can't get the text to be on top of the graphic without jumping to the next page. Is there a setting that I'm missing in Framemaker? The image is just borders, like a frame, and I'm trying to put the text inside the blank space.

    I suggest you use the text frame tool (to the left of Arnis' supplied screenshot) and set the background of the text frame (the diagonal b/w lines below the text frame tool) to None.
    When all else fails, add the text to the graphic, save as PDF or other appropriate format, and place as needed.
    -Matt
    Matt R. Sullivan
    co-author Publishing Fundamentals: Unstructured FrameMaker 11

  • How to transform text ?

    Hi guys.
    See the pic here of the text I have placed omn the rollerdoor.
    I cant find how to adjust the text on the left hand side so that it is shorter on the left than the height on the right. therefor giving it a true 3d look like the look of the rollerdoor.
    Thanks in advance.
    Will

    If you want to use corner pin on a text layer then it's easier to pre-compose the text layer, then use region of interest to quickly select only the text, then choose Composition>Crop Comp to Region of Interest. Now the corners of the corner pin effect are going to be very near the corners of the text pre-comp and therefore much easier to manipulate.
    I'd also experiment with setting the text color to a dark gray and using the multiply blend mode along with something like Roughen Edges to make the text look more like it's part of the door.
    If you want to try the 3D text layer approach then you'll need to match the camera position to properly line up the 3D layer. You can use focal length to adjust the size of your text layer, but perspective is controlled by camera position and not focal length so if you get the position right, the angles will match. This will be a little more difficult than corner pin, but, if there's movement in the shot, it may be easier to work. It's also easier to line up if you temporarily add the grid effect to help line up the perspective.

  • How do I combine text and image on same screen?

    How do I comgine text and an image on the same screen in Final Cut Express 4.  I have had to use scrolling text and then import a graphic.  I want the text and graphic on the same page.  Thanks .

    Place your video clip (or still image clip) on track v1.  Then place your text clip immediately above it on track v2.  The text will overlay the image.  (Note: it doesn't necessarily have to be v1 & v2 - what's important is that the text clip be on a video track higher than the video clip/image clip.)
    Generally best to use white text, sans-serif font, larger than you might think you initially wanted.

  • How do i add text to my photos?

    How do i add text to my photos - previously you could do this on iphoto

    Many users find the excellent and highly-recommended BorderFX more than meets their needs.
    A couple of things to note:
    - "Photos" misleads us into an understanding of what we manipulate with our computers that differs from what our computers are programmed to manipulate.  Within Aperture, you have Images (called, imho confusingly, also Versions and also Photos); outside of Aperture you have image-format files that you see listed in the Finder and use in other programs.  BorderFX lets you overlay text and watermarks, and add borders, to Images in Aperture.  When you do this, a new file is created and automatically imported (it becomes a new Original).  You can also export via BorderFX, in which case a file based on your Image and the changes you've set in BorderFX is saved to the location (outside of Aperture) that you specify.
    - Adding text to an Image is a _graphics_ operation, and not a _digital camera file_ operation:  it is outside the remit of Aperture, which hews to being a photographer's non-destructive RAW digital camera file storage and development workspace.  You use Aperture to store, organize, and develop (make as good as possible for a particular use) digital camera files.  When you need a new graphics file, you (generally) export your Image from Aperture, and create new graphics files using a graphics program (e.g.: Photoshop, Pixelmator, GIMP, etc.).  Graphics programs are built from the ground up as compositors.  Aperture does almost no compositing.  BorderFX is a slick, purpose-driven compositing plug-in.

  • How can I import text produced in Pages into Adobe inDesign?

    How can I import text produced in Pages into Adobe inDesign?

    Menu > File > Export > Word .doc/x
    I doubt it will do graphics and layout, but maybe, depending on your version of Indesign you may hit lucky (but probably not).
    Peter

  • How can I centralise text on button?

    Hi
    I made button graphic using some fill effects, and then wanted to add some text to it. Of course I could just put a text frame on top of it and group them, then convert to button, and that works fine. The problem is when I want to add the rollover effect. I just wanted to add a simple glow effect for this, but if I used a grouped item, it places the glow effect on both items in the group, including the text, ruining the graphic.
    I could type the text directly into the button graphic to avoid these double effects, but then I cannot align the text vertically within the button, because unlike text frames, graphics frames do not offer a vertical alignment option.
    The only viable option seems to be to place and addition graphic into the rollover effect from a file, which seems to be over-complicated and messy. Intuitively I would have thought a rollover state could be created simply by dragging another graphic into that position - but that's not possible either,
    Does anyone have any tips on how to achieve this?
    Jason
    [edit]
    I've solved the problem by using baseline shift, but this does not seem to be the right way of going about it to me...

    JasonDD210 wrote:
    I could type the text directly into the button graphic to avoid these double effects, but then I cannot align the text vertically within the button, because unlike text frames, graphics frames do not offer a vertical alignment option.
    Try this: do not apply the glow effect to the group, only apply it to the background form. To do this, only select the background form with the direct selection tool and open effects window.

  • How can I apply text position attributes (e.g. lower third) to more than one title at a time?

    How can I apply text position attributes (e.g. lower third) to more than one title at a time?

    jhb3243
    What version of Premiere Elements are you using and on what computer operating system is it running?
    In the case of this theoretical lower third to be applied to more than one title at a time
    a. Is there text in the lower third besides a graphic of some kind?
    b. Are all the titles to which this lower third is to be applied all together on the Timeline or scattered?
    If no text in lower third and titles all together, then, with text titles on Video 1 and lower third on Video 2, drag out the lower third to cover the length of the text titles on Video 1.
    I do not find "lower third" title files to be in the same category as certain effects where the Copy and "Paste Attributes" or "Paste Effects and Adjustments" lend themselves so well.
    Let us see what others have to say about all this. I will continue to experiment with what you seek and how you would prefer to get there. I am not optimistic but I will try.
    Thanks.
    ATR

  • HoW to ChaNGE the text in the mobile application to be in MulTi-CoLoR text

    _*  Do anyone can tell me how to change the text in the mobile application to be in multi-color text, to make it more interesting and increase readability?
    Is it using the Graphic's paint() method? or any better suggestion?
    Please give the short example if can?
    Please help... "_"
    Hearing from u all soon...@_@
    thanks....

    Go into outline view. If you can see the outlines of the letterforms, you can't just change the text. If the letterforms are solid black, take the type tool, select the text and type yours.
    Anyway you can just select the letters, take the type tool and type new text.
    Working with the type tool is a basic. Please see the manual for details

  • How to make indented text in Muse

    How to: make indented text in Muse, like a list with bullits

    I read on another post that you can do ALT 0149 (WIN) and it will create a bullet in Muse.  I tried ALT+0149 and then ALT then 0149 and neither one created a bullet so I must not be understanding the key shortcuts to create the bullet.
    The above video is not captioned (I'm deaf) so I don't understand how he's creating the bullets.  Can someone explain what I'm doing wrong?
    PS - when videos are made, it would be nice if you brought some kind of graphic on saying (for example) "Press the [whatever] key" so deaf people can see what's happening.

  • Need help on how to handle zip & text/csv as a resposne payload from Concur RestWebservice

    Hi All,
    We are getting zip(if there are multiple files) and test/csv(single file) as a response payload from the concur rest API and need your help on how to handle in NWBPM and SAP PO.
    Zip response coming in response looks like below -
    PKÀ˜F7extract_attendee_detail_p0600908soav_20150424022159.txts� rt©1204Õ50Ñ52©1¨áåPKzà@ÆPKÀ˜F2extract_CES_SAE_v3_p0600908soav_20150424022148.txts� rt©1204Õ50Ñ52©1¨©1ãåPKå늟PKÀ˜Fzà
    Text/csv response looks like below -
    Extract|2015-24-40|20|0
    Need you help on how to handle the zip content response.
    Also need help on how to handle when text/csv response comes and when zip response comes.
    As per the scenario, there are 4 calls to be made and we are using NWBPM and in the last call the actual respons (text/csv or zip) will come.
    Please provide your inputs.
    Thanks
    Narayanareddy B

    Hi Aaron,
    Thanks for your reply.
    I tried with Payload zip bean and the java mapping as mentioned in the response mapping of OM.
    Payload zip bean - Zip  zip.mode  unzip
    I am getting the error below in the receiver rest channel -
    "Transmitting the message using connection JPR failed, due to: com.sap.aii.af.lib.mp.module.ModuleException: Zip: error occured during processing: java.util.zip.ZipException: invalid stored block lengths"
    Java Mapping - used the java mapping in the response of Operation mapping
    Here also i am seeing the same error in the channel log as it is synchronous step and the message got cancelled.
    "Transmitting the message using connection JPR failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error encountered while executing mapping: com.sap.aii.af.service.mapping.MappingException: Mapping failed in runtimeApplication mapping program com/equalize/xpi/esr/mapping/java/UnzipAndAttach throws a stream transformation exception: Exception: invalid stored block lengths"
    The below is the response i am seeing and is it proper zip response payload(any encryption) , kindly advise.
    PKâE�F:ws_extract_attendee_detail_p0600908soav_20150424083413.txts� rt©1204Õ50Ñ52©1¨áåPKzà@ÆPKâE�F5ws_extract_CES_SAE_v3_p0600908soav_20150424084014.txtíTß��@~oÒÿ�÷Fº»ìV}ëòCÏz Qljß8ÜöL�`N�ùão8�Ò«�´M�Ü@�awvçûfgÇùâϤå#Ttï0Ø�B�²·olÇ�£[4Ï](L�]«�ÑbÀôÁÒc�0ÀÏdAªÙТ¨Ìû�Êv¡�b¤eJA%��=Þ7Í>PÚ=í2��7ò[�¼¡=q/°¶�*ø)
    K|<`BgÉÔºÜWs[§J�&Ñ:Ìá:´�ç«�RÐv�ÚÅAD'\�ÁtR²*DP3gî:B@JëhU�Ò'¬�ùQ\�È\D{·O×±JS\ï�-ò�¸�Þ²êó�{Å¡2®â,MmÉù XAzßüBn&®Sl-§�l¶A�×ú½³ÙFI®0¿©Ú¯¤�oT�iV²RÀJ��¼«`õ»�í Ûéwa#�àpY�««óq)U°JaøÁA�ûì>Ù³üHåÒe¾�7��Ð/§£u°Nzã÷ç4×·èãþ�¾}õ0ÙµYÄ�+J��eX\�E±ïsR%®yÜÕðsªáÚ$qÚÎÇ�Û$^%1¸AF*ý¶VÑêxÏZÏ¢U½T~Ñ®ØkW5ç×®õ¿w5¬zò:oN»�ô���íø÷úÛÙ=¬å�[ôÚ�þmczPKhÏ��i PKâE�Fzà@Æ:ws_extract_attendee_detail_p0600908soav_20150424083413.txtPKâE�FhÏ��i 5�ws_extract_CES_SAE_v3_p0600908soav_20150424084014.txtPKËö
    Thanks
    Narayanareddy B

  • How to use the fonts in the graphics menu

    I am looking to add text from the graphics options on the right hand side of the screen.  When I double click or drag one of the text options to my project a text box appears, however the text is not the one selected from the options on the right – instead the text appears and I can change the text from the list of standard fonts at the lower left - and the font I double clicked from the menu on the left isn't listed. 
    How can I select and use the fonts listed on the graphics list at the right?   I am looking to use the gray and black "outline" font.
    Thank you!

    When I press the "+" at the lower right corner of the screen I am presented with, among other things, a selection of font types.  I am able to change the text color in the graphics menu but can't figure out how to use one of the fonts listed in the menu.  For example, from the graphics menu I select "type" then "text" and from the fonts listed I double click "outline" and a text box appears on my project with "your text here", however the font is "rosewood std" and the only fonts available are from the typical list - no outline font as listed in the graphics menu on the right.   When I double click the text type "outline" the font doesn't change.  I think I am missing a step somewhere but can't figure it out.   Any help would be appreciated.  Thanks.

  • How to set the text of a cell in Numbers to vertical direction? Tks.

    Hi
    In Numbers, please tell me how to switch the text of a cell to vertical direction?
    Tks.

    Hi Kyle,
    In Numbers, nothing having to do with a table can be rotated. (In Pages an entire Table can be rotated, but not text within a Table.)
    There have been many suggestions posted here over the life of iWork for vertical labels. Most fall into three categories:
    1. Type one letter, Option-Return, type another letter, Option-Return, and so forth.
    2. Type label in a Text Box, rotate the box, position the box over the table, covering the cell where you need a label.
    3. Create a PDF graphic with rotated text and insert it into table cell as Background Fill.
    The third option is clearly the best. The steps for option three are:
    Insert Text Box
    Type label into the box
    Rotate the text box
    Select the text box (not the text inside the box)
    Command-C
    Switch to Preview.app
    Command-N
    Command-C
    Switch to Numbers
    Click on Cell where the label goes
    Command-V
    It sounds worse than it is. You can reuse the Text Box so you don't end up with a sheet full of them.
    Regards,
    Jerry

Maybe you are looking for

  • Need to print a report that has two pages but based on condition

    Hi Can someone help me. I have a report that has 2 pages and I need print it but not boths pages at the sametime. I have code ( the conditions)like this If (A=Y) then print Page 2 else print page 1 end if; Note: Where would I put the code. Please Tha

  • Schedule Lines generated for expired Scheduling agreements

    Hi All, We are facing problems in Scheduling agreements. Schedule lines are getting generated for those agreements whose validity has expired(i.e Validity in Past). Is there any check to restrict those Scheduling Agreements?? Please Help. Regards, Ri

  • Receiver mail adapter problem

    I am doing File -XI-Mail scenario.I am able to pickup the file but don't receive any mail.In RWB in communication channel monitoring I can see the error log for receiver mail adapter.The error is "failed to send mail: java.net.SocketException: Networ

  • APEX 4.2 chart error

    I'm getting error: "This XML file does not appear to have any style information associated with it. The document tree is shown below." I have function returning sql query that works on other page normally, don't know what does this error means. I don

  • Mobileme gallery in iPhoto, strange behavior

    Frequently but not always, I open iPhoto and the items in my Mobileme Gallery have the rotating upload ikon as if uploading. iPhoto is slow and behaves erratically. I force quit and when I start again iPhone works normally and all items in the Galler