Problem with continuous scale, crop JAI operations

Hi,
I am using JAI in my application, i need to do the following operations in order, for the given image.
1. Scale
2. Crop
3. Crop
Each operation gets the RenderdOp object given by the previous operation as input [Output of the 1st operation is provided as input to the 2nd, etc.]
I am facing a problem while doing the 3rd operation. This crop gives an IllegalArgumentException : Crop The rectangular crop area must not be outside the image.
When i debug the program i found that minX and minY values are causing the problem. Input for the third operation is a 45x46 image and the crop is for 45x45 and the minY is 10, the crop recatangle is 0,0 to 45,45 the crop considers the minX and minY as the starting positions of the image and result the exception.
Can anybody guide me to solve this problem!
- Rakesh

Very late, but I've just faced the same problem today. Since I'm in a hurry I've not been able to research if that behaviour is OK or some kind of bug. I guess it's OK but are missing something...
Anyway, I just summed the values from getMinX () and getMinY () to the x and y variables which I passed to the Crop operator. That way it's like if I were working in the 0,0 coordinate which I expected to be.

Similar Messages

  • Had a problem with the iPhone automatically restores operation thereof

    Had a problem with the iPhone automatically restores operation thereof

    When I speak and another call comes and I want to move it restores the iPhone runs

  • Problem with continue in a for loop

    Hi all
    I have a variable of type Node[] which contains nodes like Text,ImageView and SVGPath etc...
    now i want to filter that group which means i want to separate the Text nodes for that i used a for loop as
    var abc:Node[];
    var abcsize=sizeof abc;
    var textarray:Text[]=for(i in abc){
    if(i.toString()=="Text"){
       i as Text;  //casting Node to Text
                     }//if
               else{
                      continue;     //if the node is not of type Text then i am skipping that one
                     }//else
          }//forwhen i am trying to compile this i am getting the compilation error as
    Note: An internal error has occurred in the OpenJFX compiler. Please file a bug at the
    Openjfx-compiler issues home (https://openjfx-compiler.dev.java.net/Issues)
    after checking for duplicates.  Include in your report:
    - the following diagnostics
    - file 1.2.3_b36
    - and if possible, the source file which triggered this problem.
    Thank you.
        else{
    An exception has occurred in the OpenJavafx compiler. Please file a bug at the Openjfx-compiler issues home (https://openjfx-compiler.dev.java.net/Issues) after checking for duplicates. Include the following diagnostic in your report and, if possible, the source code which triggered this problem.  Thank you.
    java.lang.ClassCastException: com.sun.tools.javac.tree.JCTree$JCContinue cannot be cast to com.sun.tools.javac.tree.JCTree$JCExpression
            at com.sun.tools.javafx.comp.JavafxToJava.translateToExpression(JavafxToJava.java:568)
            at com.sun.tools.javafx.comp.JavafxToJava.visitBlockExpression(JavafxToJava.java:2320)
            at com.sun.tools.javafx.tree.JFXBlock.accept(JFXBlock.java:83)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToExpression(JavafxToJava.java:565)
            at com.sun.tools.javafx.comp.JavafxToJava.translateAsValue(JavafxToJava.java:575)
            at com.sun.tools.javafx.comp.JavafxToJava.visitIfExpression(JavafxToJava.java:3595)
            at com.sun.tools.javafx.tree.JFXIfExpression.accept(JFXIfExpression.java:48)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToExpression(JavafxToJava.java:565)
            at com.sun.tools.javafx.comp.JavafxToJava.visitBlockExpression(JavafxToJava.java:2320)
            at com.sun.tools.javafx.tree.JFXBlock.accept(JFXBlock.java:83)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToExpression(JavafxToJava.java:565)
            at com.sun.tools.javafx.comp.JavafxToJava.translateAsValue(JavafxToJava.java:575)
            at com.sun.tools.javafx.comp.JavafxToJava$5.addElement(JavafxToJava.java:3007)
            at com.sun.tools.javafx.comp.JavafxToJava.visitForExpression(JavafxToJava.java:3212)
            at com.sun.tools.javafx.tree.JFXForExpression.accept(JFXForExpression.java:50)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToExpression(JavafxToJava.java:565)
            at com.sun.tools.javafx.comp.JavafxToJava.translateAsValue(JavafxToJava.java:575)
            at com.sun.tools.javafx.comp.JavafxToJava.translateNonBoundInit(JavafxToJava.java:1861)
            at com.sun.tools.javafx.comp.JavafxToJava.translateDefinitionalAssignmentToValueArg(JavafxToJava.java:1876)
            at com.sun.tools.javafx.comp.JavafxToJava.translateDefinitionalAssignmentToSetExpression(JavafxToJava.java:1917)
            at com.sun.tools.javafx.comp.JavafxToJava.visitVarScriptInit(JavafxToJava.java:1976)
            at com.sun.tools.javafx.tree.JFXVarScriptInit.accept(JFXVarScriptInit.java:67)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToStatement(JavafxToJava.java:598)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToStatement(JavafxToJava.java:628)
            at com.sun.tools.javafx.comp.JavafxToJava.visitBlockExpression(JavafxToJava.java:2306)
            at com.sun.tools.javafx.tree.JFXBlock.accept(JFXBlock.java:83)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToStatement(JavafxToJava.java:598)
            at com.sun.tools.javafx.comp.JavafxToJava.access$700(JavafxToJava.java:89)
            at com.sun.tools.javafx.comp.JavafxToJava$FunctionTranslator.makeRunMethodBody(JavafxToJava.java:2164)
            at com.sun.tools.javafx.comp.JavafxToJava$FunctionTranslator.methodBody(JavafxToJava.java:2224)
            at com.sun.tools.javafx.comp.JavafxToJava$FunctionTranslator.doit(JavafxToJava.java:2279)
            at com.sun.tools.javafx.comp.JavafxToJava.visitFunctionDefinition(JavafxToJava.java:2292)
            at com.sun.tools.javafx.tree.JFXFunctionDefinition.accept(JFXFunctionDefinition.java:93)
            at com.sun.tools.javafx.comp.JavafxToJava.translateGeneric(JavafxToJava.java:500)
            at com.sun.tools.javafx.comp.JavafxToJava.translate(JavafxToJava.java:509)
            at com.sun.tools.javafx.comp.JavafxToJava.visitClassDeclaration(JavafxToJava.java:1261)
            at com.sun.tools.javafx.tree.JFXClassDeclaration.accept(JFXClassDeclaration.java:141)
            at com.sun.tools.javafx.comp.JavafxToJava.translateGeneric(JavafxToJava.java:500)
            at com.sun.tools.javafx.comp.JavafxToJava.translate(JavafxToJava.java:521)
            at com.sun.tools.javafx.comp.JavafxToJava.visitScript(JavafxToJava.java:1147)
            at com.sun.tools.javafx.tree.JFXScript.accept(JFXScript.java:89)
            at com.sun.tools.javafx.comp.JavafxToJava.translateGeneric(JavafxToJava.java:500)
            at com.sun.tools.javafx.comp.JavafxToJava.translate(JavafxToJava.java:517)
            at com.sun.tools.javafx.comp.JavafxToJava.toJava(JavafxToJava.java:691)
            at com.sun.tools.javafx.main.JavafxCompiler.jfxToJava(JavafxCompiler.java:728)
            at com.sun.tools.javafx.main.JavafxCompiler.jfxToJava(JavafxCompiler.java:699)
            at com.sun.tools.javafx.main.JavafxCompiler.compile2(JavafxCompiler.java:785)
            at com.sun.tools.javafx.main.JavafxCompiler.compile(JavafxCompiler.java:685)
            at com.sun.tools.javafx.main.Main.compile(Main.java:624)
            at com.sun.tools.javafx.main.Main.compile(Main.java:312)
            at com.sun.tools.javafx.Main.compile(Main.java:84)
            at com.sun.tools.javafx.Main.main(Main.java:69)
    ERROR: javafxc execution failed, exit code: 4
    D:\work\javaFX\javaFX_workspace\Book_fix\nbproject\build-impl.xml:143: exec returned: -1Any one please help

    - This is a real bug in the compiler, obviously. I wonder if I haven't meet it already, or something similar. Maybe you should report it.
    - The problem is that your code is incorrect anyway: the branch with continue doesn't return a value, so cannot be used in the list building. Well, at least that's what I suppose which confuses the compiler. You can try and return null (which will be discarded) instead of using continue.
    - But your code can be much more efficient, compact and perhaps even more readable, using the powerful JavaFX sequence comprehension:
    var seqMixed = [ 1, "one", Text { content: "Ichi" }, Circle {}, 2, "two", Text { content: "Ni" } ];
    println(seqMixed);
    var seqFiltered = seqMixed[ obj | obj instanceof Text ];
    println(seqFiltered);
    seqFiltered = seqMixed[ obj | not (obj instanceof Text) ];
    println(seqFiltered);

  • How do I fix problem with linked and cropped image frames not printing properly when spanning pages?

    We are using InDesign (ID) to develop and print church bulletins which contain a combination of text frames and graphics. One of the graphic types we use are TIF files which are high-resolution scans of hymns.
    A hymn usually has a combination of the musical score, plus the lyrics - with many verses., so the modular structure is 'staff' composed of a treble clef, followed by verses, followed by a base clef.
    If the example above had 6 verses instead of one, we would crop the image by adjusting the frame, so that the treble clef and the desired verses showed through the frame.
    We would then copy and link the frame - piggy back - adjusting the next content window etc....so we build a custom version of the music as a series of linked frames - each with the same base image, but a different frame position.
    So this works fine, when we do this on a single page, but when we then add a 'last staff' at the top of the following page, we encounter print problems with some output devices.
    Imagine a two-page spread, with a full page of music on the left, and the last staff (treble clef, verses, base clef) unit as a separately linked frame at the top of the right page of the spread.
    It displays correctly, and will print individually as pages correctly, but when we print it as a booklet, the last frame drops out and we have blank space.
    I can print the document to PDF and it works fine, but if I print it to a copier or laser printer I get drop out.
    It is inconsistent.
    Previews are always okay. Individual page prints are okay, but when you print the entire document, the last frame in this kind of linked series gets blanked.
    If we create and name the image differently, and call it in as a new image - (not linked to the previous), but it is still a large image that is cropped to a small piece, then it doesn't print.
    If we save the last frame as a different image type (take the TIFF file into photoshop, crop it and save it as a jpg - so it is only the 'snippet') and then import it, it works fine.
    So my question to you InDesigners....is there some setting or tip or trick I need to know to be able to link a series of frames with the same base image, but different crops and make it span across two pages properly.
    Or do we need to play this game of crop and trim the image so that it doesn't drop out?
    Any thoughts, advice, direction would be gratefully received!

    I did a lot of such hymn things in the past, but I was alway working on the scans in Photoshop, like adjusting, retouching spots and cropping. And I was always seperating those images to be more flexible so I never run into such a problem.
    I am always scanning in a higher quality level than I would need, I scan it in color, this allows me to eliminate paper color easily, even if I need 1-bit images at the end, I do it in color, so I can also turn the image.
    I did once run into a similar problem with a scan I have got from a copier-scanner machine (it was not a song). But saving as PSD resolved my problem.
    So I would suggest: Open your files in Photoshop, resave them as PSD files and use those instead. If you use 1-bit images (which is fine for this type of images) you should use a resolution equal to the printer's resolution.

  • Image Gallery, problems with Flash player 9 and Opera 9

    Hi, I'm developing a slideshow in flash (and php, JavaScript,
    XML).
    I'm coding in classes and AS2.
    I use the ExternalInterface class to communicate between
    swf's and html.
    The problem is that the Slideshow won't work properly in the
    Opera browser,
    it seems like it's working fine, but after a few click it
    stop responding.
    No problems in IE and FF.
    I've search and search to find a solution to this problem
    with no luck.
    I've put up an example of the slideshow here:
    http://www.coldminer.com/up/sw.php?thumbs=1
    The strange thing is that when I use really simplified
    versions of the code
    I'm using (with no externalInterface etc) it is working fine:
    http://www.coldminer.com/ftest/
    Anyone who have experienced similar problems, and can guide
    me to a solution.
    Opera version: 9.02 (8585)
    Flash player version: 9,0,16,0
    Thank you!
    ** Edit ->
    I found a solution, I replaced th ExternalInterface with the
    "Flash JavaScript Integration Kit",
    and all my problems with Opera was solved.

    Lo stesso problema ce l'ho io. Sembra che flash player 9 non
    riesca a leggere le versioni flash 5. Nell'installare un corso
    contenente flash 5 ho questo errore:
    Prodotto: Corso Multimediale per Photoshop 7 -- Errore 1904.
    Impossibile registrare il modulo C:\WINDOWS\system32\swflash.ocx.
    HRESULT -2147319780. Contattare il personale di supporto.

  • Problem with Adobe Flash Player into Opera Browser

    Dear Friends,
    I need your help with my 2 different problems that I am suffring with Adobe Flash Player.
    I am having a serious problem with Adobe Flash Player.
    I can see via my PC`s "Controlpanel" that I have Adobe Flash Player 11. But I am missing there Adobe Flash Player 11 ACtiveX.
    How and where I can find it and then install it?
    Lastly, I am using Opera Browser.
    There if I go to YouTube to watch any video. When i click to any video then, green background. I can hear voice but soon after whole Opera is freeze.
    Soon after video start then its background become green and after few seconds whole Opera browser freez. So I have to restart Opera again.
    Thanks.

    Hi,
    Download and install ActiveX if you use Internet Explorer.
    You need to install plug-in if you use Firefox, Opera, or Safari.
    The following link has step-by-step information: http://helpx.adobe.com/content/help/en/flash-player/kb/installation-problems-flash-player- windows.html#main-pars_heading_5
    Also, after installing ActiveX, ensure that you disable ActiveX Filtering in Internet Explorer. See the following link for details: http://helpx.adobe.com/flash-player/kb/flash-player-games-video-or.html#main_2__Disable_Ac tiveX_Filtering__if_you_are_using_Internet_Explorer_9_
    Thanks,
    Sunil

  • Multicolumn report: problem with continuous section breaks

    Hi All,
    There is a need to create RTF template which consists of 3 logical parts:
    (1) Static text -> some kind of header information;
    (2) Multicolumn (2 columns) text -> contract terms;
    (3) Static text -> information about signers;
    Here is a small screenshot as an example:
    Click for full size
    The problem is that MS Word will place continuous section breaks before and after multicolumn part. And BI Publisher will transform these section breaks into page breaks. As a result each of 3 parts will be on its own page.
    Does anyone have a solution or workaround to avoid such behavior?
    Or can advice anything?
    Thanks in advance.
    P.S. Partly solution is to put the 1st part into page header. In this case MS Word won’t place continuous section break before multicolumn part. But still there is a problem with the 3rd part as it will go to separate page :(

    Thanks for suggestion.
    I've already tried such approach and unfortunately it didn't work.
    If there is only "2 column" text in main template with the subtemplate calls before and after text, then text from subtemplates is appended to 2 column text and also formated as "2 column" text.
    Here is an example files: URL was removed
    XML file is empty as at this moment it is not important.
    Purpose is to get all 3 sections without page breaks.
    Section 2 can be 2-3 pages big.
    Edited by: user534692 on Aug 12, 2009 8:04 AM

  • Problem with 'order by' and comparison operator with varchar2 field

    I have a problem with the following sql query (field1 is varchar2):
    SELECT field1
    FROM tablename
    WHERE field1 > 'AA10BB'
    ORDER BY field1
    The contents of field1 is:
    AA10BB
    AA10-10BB
    AA10-12BB
    The sql query without the WHERE clause sorts field1 this way:
    AA10BB
    AA10-10BB
    AA10-12BB
    But the sql query with the WHERE clause has no hits.
    It seems that when sorting the minus character is greater than the 'B' character and
    at the comparison ( > 'AA10BB' ) the minus character is lower than the 'B' character!
    The database and client NLS_PARAMTER are GERMAN_GERMANY.
    The database is 9.2.0.7
    Has anyone an idea?

    thanks for your fast reply!
    My problem was that NLS_SORT was set to 'GERMAN' and NLS_COMP to 'BINARY'.
    NLS_SORT = GERMAN orders the varchar2 fields in form of 'a A b B ... 0 1 2 3 ..'
    NLS_COMP = BINARY compares binary (ASCII-Table).
    I use now:
    SELECT field1
    FROM tablename
    WHERE field1 > 'AA10BB'
    ORDER BY NLSSORT(field1, 'NLS_SORT = Binary'');

  • Problem with logarithmic scale in combination chart

    Hi Experts,
    I have a combination chart where in primary axis i am showing column chart and in the secondary axis, i am showing line chart. Now as the range of values used in the column chart is big, I have to use logarithmic scale in primary axis. But if i do so, the line chart is also being affected. The markers for negetive values in the line chart plotted in secondary axis disappears if I apply logarithmic scale in primary axis.
    Is it a bug ?
    I am using Xcelsius 2008 SP3.
    Thanks and Regards

    Hi:
       Yes, I also noticed this problem, seems when you set primary axis as "Logarithmic", the secondary axis with negative value "<0" will be ignored as "0". I think it should be an issue.
       A quick work around here is, swith your primary axis and your secondary axis, when you set seconary axis as "Logarithmic", the negative values in primary axis will not be ignored.
    Hope it helps.

  • Problem with Diagram Scale

    Hello,
    first I have to say I tried my best, but I couldn't find any solution for this problem.
    I created a table with two components: variable x and y. Then i turned it into a vertical grouped bar chart and I got this result
    http://img217.imageshack.us/img217/2050/26012png.png
    Because I ddin't want these point numbers I formatted the number into integer. Now I got this result.
    http://img39.imageshack.us/img39/6647/2601.png
    Why does it show each number twice or more? I just wanted to have 0 1 2 3 (etc.) to see.
    Where is my mistake? I've done everything I could get out of my knowldge.
    Please help me, I don't know what to do...
    Greetings
    Khaleesi

    hi,
    Please keep the Y-axis > Values > Number Format as default only.
    But if you are sure about maximum value on Y-axis then below steps will solve the issue.
    Y-axis > Scale >
    Auto scale  (Uncheck)
    Min. value = 0
    Max. value = 3 (You can set this to your maximum Y-axis value if range is known)
    Logarithmic  (Uncheck)
    Duplicates will not occur. Only numbers will appear without decimal.
    Regards,
    Vamsee

  • Problem with the scale of pictures when importing.

    I have taken 250 images which I will edit into a stop motion film. however, I've encountered a few problems.
    The biggest problem is that when I imported the images into the timeline they were severely magnified and not even centered in the frame. as you can see by this screenshot:
    This is a big problem. You'd think I wouldn't have to go through every signle image and scale it down to correctly fit the frame..... right?? It's not even centered which means I have to scale and move and be very accurate and it's going to take so many hours to do! What is wrong here, how do I fix it so that when I import the images, they are the correct scale?
    problem 2: when i put the images in the timeline they were "backwards". As in, the last image was first in the timeline and the first image was last. It's like the program is TRYING to make my life a living hell.

    I upgraded to cs6 and imported all the images together, I made them 3 frames per and exported them. The problem is slightly improved but still there. I'm still getting flicker.
    Check it out: http://www.youtube.com/watch?v=g_yZjskzTLs
    Black screen version from yesterday if you want to look at it: http://www.youtube.com/watch?v=NCcAEO8YU6Y
    The problem has to be with my settings. when I upgraded it deleted all my prefrences and settings. There was no dslr preset either so I had to redo it all from  scratch to the best of my ability. Here is a complete rundown of my settings:
    I shoot with a canon dslr 60D in 24fps and upload all my stuff in 1080p. Please advice.

  • Problems with Image scale

    hi,
    I have an Image instance that I want to manipulate by increasing and decreasing its visible size
    I've used many algorithms
    but most of it throws an out of memory error when enlarging for a couple of times.
    such as getScaledInstance(),or so;
    another thing,
    does any one know how to get a BufferedImage reference out of Image reference without casting?
    I hope any one can help.
    thanks in advance

    Maybe the code underneath helps to solve your bufferedImage/Image problem. scaledImage is the Image in that case. your other problem, in fact is, that u are running out of memory, because the Image repaints itself on and on again wihout being cleared out of the memory. in that case i would have to know about what u woild like to do with the program, so that maybe i can be of help for u. hope that helps...
    if (image != null)
    //Create BufferedImage as base
    BufferedImage sub = new BufferedImage
    Width,Height,BufferedImage.TYPE_INT_RGB);
    //Initialize painting area
    Graphics2D g = sub.createGraphics();
    //Paint scaledImage onto painting area
    g.drawImage(scaledImage, (int) -Sx, (int) -Sy, null);
    g.dispose();
    }

  • Problems with auto-scale vertical charts when change time zones

    I have built an application that utalizes Vertical Strip Charts.  Basiclly, XY Charts that are filled with 100 points of data each loop cycle.  To get the Time portion of it I use the Get Dat/Time in Seconds Function and then typecast it to a double.  I have built the application and installed in on several PC in my same time zone no problem, but when I send it to someone in the UK on GMT time the strip chart does not update correctly.  The scaling is off.  The interesting thing is the most recent time on the chart is correct and is updating correctly, but the time at the top of the graph is not correct.  Any suggestions or thoughts would be appreaciated.

    Can you post a copy of this application, or an example that would demonstrate this? If you change your timezone on your computer to UK's timezone and restart LabVIEW (which is necessary for the change to take affect in LV), do you see this behavior?
    Jarrod S.
    National Instruments

  • Problem with continuity

    hi guys , continuity with my iphone 5 with iOS 8.0.2 and my macbook pro retina 13.3 with OS X yosemite doesn't work , someone can help me please!?

    It's difficult to help with so little information. Continuity is a set of different features not just one. 
    What doesn't work?
    What have you done to troubleshoot? What were the results?
    Have you checked compatibility of your MBP?
    Running devices are both on same WiFi network?
    Bluetooth is turned on on both devices?
    Logged into the same Apple ID on both devices?

  • Problem with continuous loading logo when accessing YouTube

    How do I overcome a continuous 'loading' logo when trying to access YouTube?

    If you're stuck within an app or you've noticed a problem, simply hold both the home button and sleep/wake button at the same time. It's important to keep your fingers on these buttons until step 3.
    After a few seconds the red ‘slide to power off' screen will appear, simply ignore this. Ensure your fingers are still holding down the home and sleep/wake switch.
    Shortly after you should see the Apple logo, it's now safe to let go of the iPad's buttons. Your iPad should now boot, beware this process can take up to 15 minutes or so.

Maybe you are looking for

  • Where is the file which stores the users and groups policies?

    Hi, as mentioned in the title..i would like to know which file stores the policies of the users and groups which i've defined. And where is this file stored? Thanks.

  • Employee Self Service - configuration of home page

    I have configured the Area Group page through the IMG, however the changes are not appearing on the ESS Home Page.  How do we get the config changes to appear in the home page?  Help!!! Thanks, Janet

  • Thailand Tax and Pricing Procedure

    Hi All   Please tell me if any of you have worked on Country Thailand Version ?or anybody have SDrelated stuff in thailand. I dont have much information about tax procedure and pricing procedure in Thailand .If anybody have any documentation on this

  • Older version than school

    I have an older version on my home computer than my school.  how do I use access the school version?  I have InDesign CS2

  • CUP. How to remove a deleted active Request Type from Request Access screen

    Hi, I created a new Request Type in CUP, assigned actions, marked it active and saved. I then deleted the Request Type without first marking it as inactive. The request type is still visible on the 'Request Access' page but no longer visible on the '