BufferedImage suitable for paper onto my monitor

I wrote this method for a program we have been using for about three years that makes and prints a BufferedImage:pBI.bufIm.
But I don’t do much programming, so I can’t remember a lot of java stuff.
Please don’t put me down too much like some people do.
I don’t know the correctness or bestness of this method or necessity of all statements, but it works.
      public int print(Graphics g,PageFormat pF,int pgIx)throws PrinterException { //implemented as the only method() in Printable
        if (pgIx >= 1) return Printable.NO_SUCH_PAGE; //pgIx is page index
        Graphics2D g2d=(Graphics2D)g; g2d.translate(pF.getImageableX(),pF.getImageableY()); //Set us to the upper left corner
        AffineTransform at=new AffineTransform();   at.translate(0,0);
        double xScale=pF.getImageableWidth()/papDotImXd,  yScale=pF.getImageableHeight()/papDotImYd; //scale for fit on one page
        at=at.getScaleInstance(xScale,yScale);
        g2d.drawRenderedImage(pBI.bufIm,at);
        return Printable.PAGE_EXISTS;
      }For the monitor I had made another "parallel" BufferedImage scaled for the monitor,
but I think that was just extra work and I don’t need the second BufferedImage.
I painted it with the following method.
      public void paint(Graphics fGcontext) { //fGcontext=this.getGraphics(); where this is extended (subclassed) Frame
        if((sBI.bufIm!=null)&&(fGcontext!=null))fGcontext.drawImage(sBI.bufIm,fInsets.left,fInsets.top,this);
      } In my next program I would like to render the paper BufferedImage and show it on the screen.
My problem is I don’t know the code to do that,
but I think it must be not much longer than the print() method above.
I have code to get the screen and Frame size that I used already.
Would someone write an example small method to show me how to put a copy to screen?

With a little thinking, looking-up, and trial-and-error, I got something that worked.
      public void screenView(BufferedImage papBI,Graphics fGcontext) { //implemented as the only method() in Printable
        Graphics2D g2d=(Graphics2D)fGcontext; g2d.translate(scrDotImXp,scrDotImYp);
        AffineTransform at=new AffineTransform(); at.translate(0,0); //Set us to the upper left corner
        double xScale=scrDotImXd/(double)papDotImXd,  yScale=scrDotImYd/(double)papDotImYd;
        at=at.getScaleInstance(xScale,yScale);
        g2d.drawRenderedImage(pBI.bufIm,at);
      public void paint(Graphics fGcontext) {
        if(fGcontext!=null)screenView(pBI.bufIm,fGcontext);
      } But the picture quality is not good enough for me.
So I will stick with two BufferedImage.
But comments will still be appreciated.

Similar Messages

  • Which kind of paper is suitable for printing best quality photo by hp officejet 4500 wireless?

    Hi
    I have a "hp officejet 4500 wireless" printer and want to print best quality photo from my digital camera. Which kind of paper is suitable for my job? Please kindly advice me.
    Best regards,
    Faezeh Dibaei

    The link below will bring you to the HPshopping website for the Officejet 4500 supplies. Click on the "Paper" link at the top of the webpage and it should show you the supported paper types. I would personally asuggest the Advanced photo paper for photo pritning.
    http://shopping2.hp.com/en_US/home-office/-/produc​ts/-/-/CB867A?TargetPage=productsupplies
    Binary_Zen (worked at HP )
    Click the white Kudos star to say thanks
    Please mark Accept As Solution if it solves your problem

  • Does Mac OS make PDFs suitable for going to Press?

    For some years I've been producing a series of small, relatively simple booklets (4x5", 44pp, text & scanned line-art graphics). I've been putting them together in PageMaker (v.5—yes, in OS 9), and making PDFs to go to press with Acrobat (v.5). Now I can't use PageMaker for the latest one, because it's in Japanese, which PM can't handle; so I'm trying Pages. Seems to work okay, but I'm wondering about the PDF part: Does Mac OS X's "Print to PDF" function make a PDF suitable for going to press, like the "Press" setting in Acrobat—i.e. with full-resolution graphics, etc.? (I know Mac OS's PDFs embed the fonts in the document, so that part would seem to be covered.) Anyone know if there's anything to worry about there? Anything special I need to do?
    TIA,
    Andrew Main

    Can you post a screen snap and specification of your newsletter
    What I'm working on is a reprint of the Japanese version of the Thanksgiving Address for The Tracking Project, a fine organization run by a friend of mine. The Thanksgiving Address is an ancient Mohawk prayer/invocation, thanking all the elements of the world around us for their contributions to our lives. The original version takes a week to recite (and an elder who died a decade ago may have been the last man who remembered the whole thing); this is a much abbreviated version for international distribution. We produced the first edition, in the original Mohawk and English, in 1993. A year or two later, one of John's associates in Germany said he'd like to do a German version, so we did that. And so on. We just put out an Italian version, making ten different languages, each with the original Mohawk. See below the cover and one spread from the original English version, and samples from the Hawaiian and the Japanese version, which I'm working on now.
    I did the original English/Mohawk version in PageMaker in 1993, and every version since except the Japanese, as PageMaker doesn't handle Japanese. All the others are in the Latin alphabet, though the Hawaiian required a specially modified Palatino font (with accented letters in ASCII slots) which luckily someone at the University of Hawaii had made up in the pre-Unicode days. In the 90s I was sending PageMaker 5 files to the printer, which fortunately they could open and work onto the press; only in recent years have I come across an old copy of Acrobat and learned how to distill the PageMaker files into press-ready PDFs.
    For the original Japanese version in 1999, I took the usual layout in PageMaker, with the Mohawk text but the space for the other text blank, had it printed out at a service bureau on fine paper, then made up the Japanese text in AppleWorks, had it printed, then pasted the Japanese text blocks onto the PageMaker printout, and took it to the printer, who fortunately still had a camera to photograph it. I've been in graphic arts since the 60s, and was an expert paste-up man (pretty good on the corner print shop black-and-white camera too, as well as the IBM Selectric Composer), worked on (among others) the Whole Earth Catalog in the 70s and Stereophile magazine in the 80s.
    But now it's time to reprint the Japanese version, and the translator wants to make changes, so I figured it was finally time to try updating my work into the current computer world. I have no need of InDesign (nor money to buy it—or do you have to rent it now?). I first thought of using Libre/OpenOffice (wish they'd get that straightened out) for future file compatibility, and from what I knew it seemed to have all the details I needed for this simple job. But, as a Mac user exclusively since I got my first computer in 1988, I found the program opaque, and when I early ran into a situation where a command I needed wasn't on the menu the manual said it was on, I gave up and went to Pages, which I have used a little, though there's a lot about it I don't care for. It seems like a lot of effort has been put into the façade, but some pretty shoddy work behind it.
    But I've found it not very difficult to set up the Japanese Thanksgiving Address job in Pages, only I'm concerned if the printer can use it. Thus my query here. I'll be contacting the printer, and send them a sample PDF to see if it works for them. I hope I won't have to add crop marks, as from my initial look at the Manual, it seems Master Objects are only available on WP documents (which seems dumb)—which means I would have to manually add them on all 44 pages. Anyway it's a simple job, black only, so it should be workable.
    Apple has moved so far from their old base of professional print designers it would be safe to say it isn't going to do anything to fix the issues.
    Yes, 'tis a pity indeed. Now if you could do professional graphics on an iPad, there'd probably be a lot of time put into perfecting it. The Mac, though, and what it used to do, is old hat.
    Have you thought about running a 32 bit version of OSX that supports Pagemaker in emulation?
    I tried that once, back in the OS X 10.4 days, and it made my fans go wild. Anyway, the problem is that PageMaker can't work with Japanese—or I could just run it on my G3 PowerBook as I do for the other jobs.

  • DVD Burn problem. "Device error - the target device isn't suitable for use"

    Hello everyone,
    I initially had a lot of problems with PE8. However the nVidia driver update solved most of them.
    Just thought it was important to report success as well as failure!
    However one problem remains. I get the following error at the 96% mark while burning. "Device error - the target device isn't suitable for use". It is always at the 96% mark and the program is "compiling [something]" when this happens.
    Having searched this site I notice that user rgferg posted a similar problem 13 days ago but was redirected to repost in a different place, but never did.
    I have tried to burn a 1hr clip 4 times and every time I have selected the slower burn speed (8MB/s) as has been suggested. It seems that inferior media is a culprit, so I have bought some [quality] Verbatim DVD-R media to try in my Phillips SATA optical drive. I am sceptical this will work, but open minded nonetheless. I will give it a whirl when my computer has stopped capturing the VHS I am working on.
    Each time the burn failed the disk was automatically ejected and the burn process had actually started and progressed perhaps ~40% or so.
    This indicates to me that it is a drive sharing issue, rather than a media issue. Somewhere on this forum it suggests that I go through a 20+ step process and delete/disable every piece of software that can compete with Premiere among other things. IF I do this what do I burn with outside of Adobe? Do I have to get imgburn or whatever it was called? What if I like Nero? Nero 6 has worked great for me for 3 years.
    So given I am willing to uninstall my old optical drive burning software, who out there can recommened commercial software that for them creates a painless Adobe burning experience with no errors or conflicts? Perhaps there is another solution that I did not see on this forum?
    I am running Windows XP SP3. I have the latest nVidia drivers for my SLI GeForce 7600 GS cards. I have 3 monitors. RAID 0 SATA, 2GB RAM, Athlon X2 5400.
    Justin.

    OK been working through the list of 20 things Adobe recommends to fix DVD burn error. No luck yet:
    system meets minimum requirements
    Project size does not exceed disk capacity
    successfully burned project to DVD folder -thus skip to step 8.
      8.   Using new blank media for burning
      9.   Try different media and DVD burners. Bought Verbatim DVD-R. Don't have another DVD burner. Adobe's supported burner list is VERY short, so of course mine is not on it.
      10.  Uninstalled Nero 6. Did NOT uninstall Acronis True Image workstation or Lightscribe. These do not access the drive unless I say so!
      11.  Have not yet disabled startup items and services. This will take a lot of work and will leave to last. Deactivated Spybot thus far.....
      12.  Disabled IMAPI CD burning COM
      13.  DMA if available already set. Haven't set this in BIOS yet. I already think it is, but will check next boot.
      14.  Updated DVD firmware
      15.  Already updated nVidia drivers
      16.  Don't have any other DVD drives to disconnect.
      17.  MPEG workaround. Will resort to if required.
      18.  Disable Autoplay? XP only has "prompt me each time to choose an action". I have set this for ALL file types.
      19.  Have NOT refreshed the DVD drivers in the registry. This step involves uninstalling PE8. Will leave this as last resort.
      20.  Visit forums to see if other have the same problem. Hi guys
    So still working through some of the items above.
    Can anyone direct me to advice on how to write the encoded files sent to the hard drive, or the VOB files that PE8 failed to burn to a disk? Will the former work with DVD menus?
    What a process.
    Stay tuned.
    Justin.

  • Is JMS based solution is suitable for the following:

    I an new to JMS. Im familiar with its basics (in theory and ran very simple examples).
    I was wondering if a clients server clients system, exchanging text messages and images is suitable for JMS or should I use a non J2EE component. The system should be able to serve about 100 users at the same time with a logic of whom should get certain messages.
    Thanks.

    The main question is number 1; for massive files (over 10-20Mb) you don't want to use 1 message per file; you either need to split it yourself into multiple messages or use some JMS Stream helpers like ActiveMQ has...
    http://activemq.org/JMS+Streams
    Decent JMS providers can handle massive load & high performance, federated networks, load balancing and reliability as well as things like throttling, flow control and so forth along with added features like JMX monitoring of queue depths & throughput rates so questions 2 and 3 can be supported whatever those numbers are - assuming you've got a decent provider and enough hardware :).
    For question 4; you've the option in JMS to choose your quality of service; whether to use persistence or not or to use queues or topics etc.
    I'd maybe make the questions
    1. How big are your images
    2. Do you need point to point or publish/subscribe?
    Though as Steve suggests its always worth testing that your load can be handled correctly by your middleware technologies & hardware.
    James
    http://logicblaze.com/

  • Does NetWeaver / XI suitable for a generic BPM package?

    Dears,
    We are focus on deliver BPM solution and service.  We are very interested in NetWeaver XI/BPM.  But would like to confirm the NetWeaver function is suitable for a generic BPM solution.  We are convinced that XI can do EAI/process integration very well, especially integrated to SAP.  But further more, We want to know if the XI can play a workflow role as well as Ultimus workflow.  For instance, organization management, security management, multi-level approval process, send alert/message/mail, workflow monitoring.
    Any comment would be very appreciated.

    No, at the moment it is possible to have an organization managment and approval process is not possible with BPM. However, the BPM process can be integrated with the SAP/non-SAP workflows in the application systems to enable the organization management and approval process.
    Sending of alerts/messages/mails and monitoring is suppoted by BPM.
    During configuration time a workflow template is generated for each BPM process develped in XI. So all the monitoring avaliable for workflow can be used to monitor the BPM process
    I am not sure of what do you mean by security management in BPM?
    -Sreekanrh

  • Is Lightroom 5 Student and Teacher suitable for upgrading?

    I am using the Lightroom 5 Student and Teacher version.
    Now I am asking myself, how I could upgrade to Lightroom 6. According to Adobe, there does not exist a Lightroom 6 Student and Teacher version.
    Therefore, could I upgrade the Lightroom 5 Student and Teacher version to Lightroom 6?
    Is Lightroom 5 Student and Teacher suitable for upgrading?

    Does it mean that i need more than my last school certifiate? Cause i do not own a academic mail adress.
    By the way: thanks for your reply.
    And another question: If Adobe does not accept my student identification, can i reuse the Key from the Box, to sell it again or to use for a relative of mine who is studying? Cause in case Adobe does not accept my student identification, i have purchased a box of paper with a useless CD.
    Best regards
    Kammo

  • Layout change in invoice suitable for taking printout in A-4

    Address is larger than the space provided in the pre- printed stationary invoice provided by our client, how to adjust the font, that fits for print out sheet of A- 4 size.kindly tell me how to adjust the size of layout. is there any need for ABAPer, to work on re-sizing of the layout of the slip, which is suitable for taking printout ?
    regards,
    g.v.shivakkumar

    Hello,
              Do you mean to say that you want to shift between landscape and portrait formats of A4?
              If so find this solution.The solution is simple , go to Pages and windows and double click on the page. In the second Tab strip named "Outbound options" select "Portrait" or "Landscape" format. The page type is selected as DINA4 for A4 sized paper.
    Reward Points.
    Tej..

  • I want to open excel spread sheets make additions and export back to pc users.  Is numbers suitable for this activity?

    I want to open excel spread sheets make additions and export back to pc users.  Is numbers suitable for this activity?  I am using a MACBook Air

    just read this in an other answer:
    Pages can open docx files, Numbers can open xlsx files. Each can export to  can export .doc or .xls to the newest Word or Excel format.respectvely, but not to the more recent .docx or .xlsx.
    Translation is not perfect in either direction. Numbers and Excel handle some similar features (eg. pop-up menus vs data validation) differently, and the translator cannot translate from one implementation to the other.
    If much of your work is going to be transferred between your machine and Windows machines running either MS Excel or MS Word, with editing taking place at both ends of the tunnel, then you'll probably be better off with Office, or one of the Office clones on the Mac end.

  • Report page scaling/zoom for paper size and field width?

    Are there ways to design a report, or programmatically set a report to dynamically resize based on factors such as paper size (A4 vs. Letter vs. Legal), orientation (portrait vs. landscape), and field width (e.g fields grow and shrink based on data)?  We are looking at ways to dynamically choose paper size and scale.  This would be similar to how Excel files can adjust for printing depending on paper, and PDF files can zoom in/out for paper size.
    Thanks,
    Kyle

    We don't want to add fields dynamically at runtime.  Instead we want to automatically resize fields at runtime to properly fit data on the page.  Currently with our 400 reports, data fields have gotten longer over the years so important data is being truncated.  We'd like it if fields could properly grow/shrink/scale so that the data is always valid.  We'd like it if the user flips from portrait to landscape, the field widths automatically grow to use the entire page.  Or, if a user goes from Letter to A4, pagination still works properly and the fields get slightly wider to fit the A4 standard.
    What we don't want is to have a version of the report for portrait Letter, portrait A4, portrait Legal, landscape Letter, landscape A4, landscape Legal, etc.  It would be a support nightmare.
    I don't know if it is possible, but I'm hoping it is.  Thanks for the help.
    Kyle

  • As a part of my Daily Reporting Activity; i have to send 35 SMS everyday. Can someone suggest me which software is suitable for my usage as it's tedious job to forward the same sms report 35 times. I am using  IPhone 3GS -32 GB. Sincerly req your reply

    As a part of my Daily Reporting Activity; i have to send 35 SMS everyday. Can someone suggest me which software is suitable for my usage as it's tedious job to forward the same sms report 35 times. I am using  IPhone 3GS -32 GB. I am using service of Vodafone, Mumbai. & when i first time sent 35 SMS (having habit of Nokia to send group SMS at the click of one button) my IPhone sent 35 MMS.

    Found something for you that might be useful:
    http://itunes.apple.com/us/app/igroup-sms/id377378452?mt=8

  • Error while burning dvd in pre 8.0 "device error-the target device isn't suitable for use."

    I am trying to burn a dvd in premiere elements 8.0 but after 96%  iam getting this error :
    "device error-the target device isn't suitable for use."
    I have tried all of these steps according to this link :http://kb2.adobe.com/cps/515/cpsid_51553.html.
    System configration :
    win vista 32 bit .
    Processor :Amd athlon 64 dual core 2.60 ghz .
    Ram :3 gb
    Graphic card :nvidia geforce 6150 se .
    Camcoder model number  :JVC gz-hm320.
    Format :.mts
    Frame size :1920/1080
    Frame  rate :29.97.
    Please look into this problem .
    Regards
    Manoj Khati

    This is a user to user forum, not Adobe support... YOU look into things, based on advice other users are able to give
    Things and Software to AVOID when authoring/burning a DVD
    Read all links/sub-links to create a "best" burned disc
    Start --> http://forums.adobe.com/thread/608660?tstart=0
    #2 has WHY Explained http://forums.adobe.com/thread/607390
    Plus a Microsoft note http://support.microsoft.com/kb/314060
    And another note http://support.microsoft.com/kb/982116

  • Does not contain a static 'Main' method suitable for an entry point_

    Hello
    I want to to do a project with Entiity Framework . I add a project to my solution for my domain class and it's name is 'LinkModel.DomainClasses'.  when I prees F5 there is an error like bellow.
    Could You help me to solve this? thanks alot
    ..\Documents\Training\LinkCodeFirstLast\LinkCodeFirst\LinkCodeFirst\LinkModel.DomainClasses\obj\Debug\LinkModel.DomainClasses.exe'
    does not contain a static 'Main' method suitable for an entry point

    Hi bkshn,
    This error is caused by the missing "Main" method in your project. it is the entry point of your project.
    If you want to create a EF project, you could follow the way in the aricle below.
    https://msdn.microsoft.com/en-us/data/ee712907#codefirst
    The Main method is like below.
    class Program
    static void Main(string[] args)
    using (var db = new BloggingContext())
    // Create and save a new Blog
    Console.Write("Enter a name for a new Blog: ");
    var name = Console.ReadLine();
    var blog = new Blog { Name = name };
    db.Blogs.Add(blog);
    db.SaveChanges();
    // Display all Blogs from the database
    var query = from b in db.Blogs
    orderby b.Name
    select b;
    Console.WriteLine("All blogs in the database:");
    foreach (var item in query)
    Console.WriteLine(item.Name);
    Console.WriteLine("Press any key to exit...");
    Console.ReadKey();
    And you could start to learn the EF from the following MSDN blogs.
    https://msdn.microsoft.com/en-us/data/ee712907
    If you have any other concern regarding this issue, please feel free to let me know.
    Best regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Projectname.exe' does not contain a static 'Main' method suitable for an entry point .

    Hi,
    I'm developing a blog reader for windows 8 store app. It was perfectly worked before. But because of some miss behave my coding i get below error. No other errors there.
    Error    1    Program 'c:\Users\.........\Desktop\Blog_Reader\Blog_Reader\obj\Release\intermediatexaml\Blog_Reader.exe' does not contain a static 'Main' method suitable for an entry point    C:\Users\..........\Desktop\Blog_Reader\Blog_Reader\CSC  
     Blog_Reader
    Please help me to figure this.
    Thank You!

    Go to your App.Xaml and R-Click Go to Properties
    Check whether the Build Action is ApplicationDefinition
    If not change it to ApplicationDefinition. Clean the code (solution ) and Deploy..
    Chears....

  • Solution for Windows Store app "projectname.exe" does not contain a static 'Main' method suitable for an entry point . Error.

    Hi,
    I'm developed a blog reader for windows 8 store app. It was perfectly worked before. But suddenly it started to miss behave and I got an
    error. No other errors were there other than that.
    Error 
    Program c:\Users\.........\Desktop\Blog_Reader\Blog_Reader\obj\Release\intermediatexaml\Blog_Reader.exe' does not contain a static 'Main'
    method suitable for an entry point. 
    C:\Users\..........\Desktop\Blog_Reader\Blog_Reader\CSC    Blog_Reader
    But I found the solution while I fixing it.
    Solution for that is like below.
    Go to your App.Xaml and Right-Click thenGo to Properties
    Check whether the Build Action is
    ApplicationDefinition
    If not change it to ApplicationDefinition.
    Clean the code (solution) and Deploy
    Now the error is fiexed.

    Hi Robana, 
    Good sharing on the Technet. 
    This will definitely benefit other who may encounter the same issue as yours.
    Thanks for your sharing again. 
    Kate Li
    TechNet Community Support

Maybe you are looking for