Creating a custom DataBuffer for very LARGE images

I would like to work with very large images (up to 100MB) in an application.
Only for image manipulating, not rendering for screen.
My idea is to write my own DataBuffer which use Hard Drive,maybe with some "intelligent" swapping.
But At first performance doesn�t matter.
I try this:ColorModel cm = ColorModel.getRGBdefault();
SampleModel sm = cm.createCompatibleSampleModel(w,h);
DataBuffer db =  new  myDataBufferInt(size);
WritableRaster raster = Raster.createWritableRaster(sm,db,null);But somebody don�t like myDataBuffer
and of course it is type DataBuffer.TYPE_INTthrows:java.awt.image.RasterFormatException: IntegerComponentRasters must haveinteger DataBuffers
at sun.awt.image.IntegerComponentRaster.<init>(IntegerComponentRaster.java:155)
at sun.awt.image.IntegerInterleavedRaster.<init>(IntegerInterleavedRaster.java:111)
at sun.awt.image.IntegerInterleavedRaster.<init>(IntegerInterleavedRaster.java:78)
at java.awt.image.Raster.createWritableRaster(Raster.java:980)
public  class myDataBufferInt extends DataBuffer {
public myDataBufferInt(int size) {
        super(TYPE_INT,size);
    . . . }The question is how to manage large image?
What kind of subclasses I have to write?
Thank you all
P.S: I don�t want to use: java -Xmsn -Xmxn

i have the same problem let me know please if you have an answer?

Similar Messages

  • Please help!! "Can't open the illustration. This artwork contains a very large image that can not...

    Hi all, I am subscribing Illustrator CS6 16.0.0 and using it on Windows 7.
    Few days ago I was working with one file, I saved it successfully and now when I'm trying to open it an error message occures "Can't open the illustration. This artwork contains a very large image that can not be read on this version of AI. Please try with 64-bit version." and ALMOST ALL of the objects (vector) are missing as if they were deleted!
    It's kind of strange since I created the file with the same program and everything was working properly before.
    Please Please advice further steps for recovering my file.

    Thank you so much! the file is recovered (as well as my emotional state )
    The finding of the day - apparently I have two versions of AI in my PC!

  • How to create a "Custom Color" for highlighting? (Acrobat XI)

    March 10, 2014
    How to create a "Custom Color" for highlighting? (Acrobat XI)
    The numbers in the RGB and other fields change as various numbers are changed.
    I wanted to create a pale orange:
    Hue               13      Red      255
    Saturation   240      Green  177
    Luminosity    86       Blue     140
    I'd selected one of the orange squares in the color grid, to display the general orange area of the slider.
    I moved the slider to select a pale orange, which generated the above numbers.   Since this wasn't directly available to save to a Custom Color, I tried to  edit the numbers.  Unfortunately, the other numbers changed, making it impossible to actually create a color.
    Any suggestions would be appreciated.
    Note:  I used Techsmith's Snagit to show screen shots in a Word document.
    When I attempted to browse and upload the file, the error message said "[The content type of this image is not allowed.]"
    OK...what images *are* allowed?

    Hi Don,
    I saw Gilad answered your question in another forum post.
    Do you have everything you need at this point?
    Let me know if you need further assistance.
    Kind regards, Stacy

  • How can we suggest a new DBA OCE certification for very large databases?

    How can we suggest a new DBA OCE certification for very large databases?
    What web site, or what phone number can we call to suggest creating a VLDB OCE certification.
    The largest databases that I have ever worked with barely over 1 Trillion Bytes.
    Some people told me that the results of being a DBA totally change when you have a VERY LARGE DATABASE.
    I could guess that maybe some of the following topics of how to configure might be on it,
    * Partitioning
    * parallel
    * bigger block size - DSS vs OLTP
    * etc
    Where could I send in a recommendation?
    Thanks Roger

    I wish there were some details about the OCE data warehousing.
    Look at the topics for 1Z0-515. Assume that the 'lightweight' topics will go (like Best Practices) and that there will be more technical topics added.
    Oracle Database 11g Data Warehousing Essentials | Oracle Certification Exam
    Overview of Data Warehousing
      Describe the benefits of a data warehouse
      Describe the technical characteristics of a data warehouse
      Describe the Oracle Database structures used primarily by a data warehouse
      Explain the use of materialized views
      Implement Database Resource Manager to control resource usage
      Identify and explain the benefits provided by standard Oracle Database 11g enhancements for a data warehouse
    Parallelism
      Explain how the Oracle optimizer determines the degree of parallelism
      Configure parallelism
      Explain how parallelism and partitioning work together
    Partitioning
      Describe types of partitioning
      Describe the benefits of partitioning
      Implement partition-wise joins
    Result Cache
      Describe how the SQL Result Cache operates
      Identify the scenarios which benefit the most from Result Set Caching
    OLAP
      Explain how Oracle OLAP delivers high performance
      Describe how applications can access data stored in Oracle OLAP cubes
    Advanced Compression
      Explain the benefits provided by Advanced Compression
      Explain how Advanced Compression operates
      Describe how Advanced Compression interacts with other Oracle options and utilities
    Data integration
      Explain Oracle's overall approach to data integration
      Describe the benefits provided by ODI
      Differentiate the components of ODI
      Create integration data flows with ODI
      Ensure data quality with OWB
      Explain the concept and use of real-time data integration
      Describe the architecture of Oracle's data integration solutions
    Data mining and analysis
      Describe the components of Oracle's Data Mining option
      Describe the analytical functions provided by Oracle Data Mining
      Identify use cases that can benefit from Oracle Data Mining
      Identify which Oracle products use Oracle Data Mining
    Sizing
      Properly size all resources to be used in a data warehouse configuration
    Exadata
      Describe the architecture of the Sun Oracle Database Machine
      Describe configuration options for an Exadata Storage Server
      Explain the advantages provided by the Exadata Storage Server
    Best practices for performance
      Employ best practices to load incremental data into a data warehouse
      Employ best practices for using Oracle features to implement high performance data warehouses

  • Editing very large images

    I have several very large images that require minor editing. The tasks that I require are only basic rotation, cropping, and maybe minor color adjustments.
    The problem is that the images range from 20780 x 15000 px down to 11150 x 2600 px.
    With images this size, when I try to perform any operation on the entire image, like a 3 deg rotation, fireworks simply times out. Maybe it is because it can't generate the preview image at that size, maybe it simply can't calculate the image at that size. If it is just the preview image, is there a way to lower the quality (say, jpeg quality of 5%) of the preview image only but when I export the image, I can keep it at 100%?
    Thank you,
    -Adam
    (Yes, I did search, but the forums search seemed mildly useless and engine results consistently returned nothing)

    Fireworks is not designed to work with images of this size. It's a screen graphics application. Photoshop would be a better option here, or other software designed for working with high resolution files.
    Jim Babbage

  • Possible to create a custom renderer for rendering standard component ?

    This is in context for creating dynamic Data tables. Is it possible to create a custom Renderer for rendering component (standard) without creating a custom component?
    namanc

    Let's assume you want to create a custom renderer which will be used to render the error-messages (the h:messages tag). The component-family in this case is: javax.faces.Messages, the renderer-type javax.faces.Messages.
    Therefor in your application's faces-config.xml add this renderer-statement (inside a render-kit, obviuosly):
    <faces-config>
      <!-- other stuff like components, managed beans, navigation-rules,... -->
      <render-kit>
        <renderer>
          <component-family>javax.faces.Messages</component-family>
          <renderer-type>javax.faces.Messages</renderer-type>
          <renderer-class>my.very.special.MessagesRenderer</renderer-class>
        </renderer>
      </render-kit>
      <!-- other renderers... -->
    </faces-config>The code for MessagesRenderer is very dependent on your needs, therefor I will not post something here. Basically you need to extend javax.faces.render.Renderer. For help in that camp, surf to the online tutorials or get yourself a book (I learned a lot from Kito Mann's "JSF in Action"). Additionally grab the source for Sun's RI AND Myfaces and dig into that java-code. There is a huge learning potential looking at that source-material.
    hth
    Alexander

  • Creating a custom serializer for SOAP

    Hi guys, i'm wondering if someone could help me. I'm trying to create a custom serializer for a class with SOAP and I'm geeting the following SOAPException:
    Fault Code = SOAP-ENV:Server.Exception:
    Fault String = org/apache/soap/util/xml/Serializer
    I'm able to deploy the service with no problems.
    I'm using a very simple example in which I'm only trying to get a Person class from the service. here is the deployment descriptor:
    <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment" id="urn:PersonService">
      <isd:provider type="java"
                    scope="Application"
                    methods="getPerson">
        <isd:java class="app.PersonService" static="false"/>
      </isd:provider>
      <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
      <isd:mappings>
        <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                 xmlns:x="urn:person"
                 qname="x:person"
                 javaType="app.Person"
                 java2XMLClassName="app.PersonSerializer"
                 xml2JavaClassName="app.PersonSerializer"/>
      </isd:mappings> 
    </isd:service>here is the PersonService.java:
    package app;
    public class PersonService {
        /** Creates a new instance of GetPerson */
        public PersonService() {
        public Person getPerson() {
            return new Person("joe", "something");
    }here is the Person.java:
    package app;
    public class Person {
        public String firstName;
        public String lastName;
        /** Creates a new instance of Person */
        public Person() {   
        public Person(String firstName, String lastName) {
            this.firstName = firstName;
            this.lastName = lastName;
    }here is the PersonSerializer.java:
    package app;
    import java.io.IOException;
    import java.io.Writer;
    import org.apache.soap.encoding.soapenc.SoapEncUtils;
    import org.apache.soap.rpc.Parameter;
    import org.apache.soap.rpc.RPCConstants;
    import org.apache.soap.rpc.SOAPContext;
    import org.apache.soap.util.Bean;
    import org.apache.soap.util.StringUtils;
    import org.apache.soap.util.xml.DOMUtils;
    import org.apache.soap.util.xml.Deserializer;
    import org.apache.soap.util.xml.NSStack;
    import org.apache.soap.util.xml.QName;
    import org.apache.soap.util.xml.Serializer;
    import org.apache.soap.util.xml.XMLJavaMappingRegistry;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    public class PersonSerializer implements Serializer, Deserializer {
        /** Creates a new instance of PersonSerializer */
        public PersonSerializer() {
        public void marshall(String string, Class aClass, Object object, Object object0, Writer writer, NSStack nSStack, XMLJavaMappingRegistry xMLJavaMappingRegistry, SOAPContext sOAPContext) throws IllegalArgumentException, IOException {
            nSStack.pushScope();
            SoapEncUtils.generateStructureHeader(string, aClass, sOAPContext, writer, nSStack, xMLJavaMappingRegistry);
            writer.write(StringUtils.lineSeparator);
            Person person = (Person)object;
            String firstName = person.firstName;
            String lastName = person.lastName;
            xMLJavaMappingRegistry.marshall(string, String.class, firstName, "firstName", writer, nSStack, sOAPContext);
            writer.write(StringUtils.lineSeparator);
            xMLJavaMappingRegistry.marshall(string, Integer.class, lastName, "lastName", writer, nSStack, sOAPContext);
            writer.write(StringUtils.lineSeparator);
            writer.write("</" + sOAPContext + '>');   
            nSStack.popScope();
        public Bean unmarshall(String string, QName qName, Node node, XMLJavaMappingRegistry xMLJavaMappingRegistry, SOAPContext sOAPContext) throws IllegalArgumentException {
            Element root = (Element)node;
            Element childElement = DOMUtils.getFirstChildElement(root);
            Person target;
            try {
                target = (Person)Person.class.newInstance();
            } catch (Exception e) {
                throw new IllegalArgumentException("Problem instantiating bean: " + e.getMessage());
            while(childElement !=null) {
                Bean paramBean = xMLJavaMappingRegistry.unmarshall(string, RPCConstants.Q_ELEM_PARAMETER, childElement, sOAPContext);
                Parameter param = (Parameter)paramBean.value;
                String tagName = childElement.getTagName();
                if(tagName.equals("firstName")) {
                    target.firstName = (String)param.getValue();
                } else if(tagName.equals("lastName")) {
                    target.lastName = (String)param.getValue();
                childElement = DOMUtils.getNextSiblingElement(childElement);
            return new Bean(Person.class, target);
    }and finally here is the client app class that calls the service, the GetPersonClient.java:
    package app;
    import java.net.MalformedURLException;
    import java.net.URL;
    import org.apache.soap.Constants;
    import org.apache.soap.Fault;
    import org.apache.soap.SOAPException;
    import org.apache.soap.encoding.SOAPMappingRegistry;
    import org.apache.soap.rpc.Call;
    import org.apache.soap.rpc.Parameter;
    import org.apache.soap.rpc.Response;
    import org.apache.soap.util.xml.QName;
    public class GetPersonClient {
        /** Creates a new instance of GetPersonClient */
        public GetPersonClient() {
        public static void main(String[] args) {
            SOAPMappingRegistry registry = new SOAPMappingRegistry();
            PersonSerializer personSerializer = new PersonSerializer();
            // Map the types.
            registry.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("urn:person", "person"), Person.class, personSerializer, personSerializer);
    // Build the call.
            Call call = new Call();
            call.setSOAPMappingRegistry(registry);
            call.setTargetObjectURI("urn:PersonService");
            call.setMethodName("getPerson");
            call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
            Response response;
            try {
               response = call.invoke(new URL("http://localhost:8090/soap/servlet/rpcrouter"), "");
            } catch (SOAPException e) {
                System.err.println("Caught SOAPException: " + e.getMessage());
                e.printStackTrace();
                return;
            } catch (MalformedURLException ex) {
                ex.printStackTrace();
                return;
            if (!response.generatedFault()) {
                Parameter parameter = response.getReturnValue();
                Person person = (Person)parameter.getValue();
                if ( person != null ) {
                    System.out.println( person.firstName + " " + person.lastName );
            } else {
                Fault fault = response.getFault();
                System.err.println("Generated fault: ");
                System.out.println("  Fault Code   = " + fault.getFaultCode());
                System.out.println("  Fault String = " + fault.getFaultString());
    }if someone could help me i would be grateful.
    cheers
    nmc

    Is the problem in your 'marshall' method? You seem to be using Integer.class instead of String.class for the 'lastName' parameter...

  • Grid Control Architecture for Very Large Sites: New Article published

    A new article on Grid Control was published recently:
    Grid Control Architecture for Very Large Sites
    http://www.oracle.com/technology/pub/articles/havewala-gridcontrol.html

    Oliver,
    Thanks for the comments. The article is based on practical experience. If one was to recommend a pool of 2 management servers for a large corporate with 1000 servers, what that would mean is that if 1 server was brought down for any maintenance reason (for eg. applying an EM patch), all the EM work load would be on the remaining management server. So it is better to have 3 management servers instead of 2 when the EM system is servicing so many targets. Otherwise, the DBAs would be a tad angry since only 1 remaining managment server would not be able to service them properly during the time of the maintainance fix on the first management server.
    The article ends with these words: "You can easily manage hundreds or even *thousands* of targets with such an architecture. The large corporate which had deployed this project scaled easily up to managing 600 to 700 targets with a pool of just three management servers, and the future plan is to manage *2,000 or more* targets which is quite achievable." The 2000 or more is based on the same architecture of 3 managment servers.
    So as per the best practice document, 2 management servers would be fine for 1000 servers, although I would still advise 3 servers in practice.
    For your case of 200 servers, it depends on the level of monitoring you are planning to do, and the type of database managment activities that
    will be done by the DBAs. For eg, if the Dbas are planning on creating standby databases now and then through Grid Control, running backups daily
    via Grid Control, cloning databases in Grid Control, patching databases in Grid Control and so on, I would definitely advise a pool of 2 servers
    in your case. 2 is always better than 1.
    Regards,
    Porus.
    Edited by: Porushh on Feb 21, 2009 12:51 AM

  • ROLLOVER for a large image to appear

    I am redoing my previous website. In that site, I had movie
    clip within a movie clip. This new site will not work using that
    procedure.
    The new website situation:
    My website is setup with small images, two in a row and two
    columns of four small images 60pixels x 68pixels. Those are on the
    right side and also on the left side (with different set of small
    images). In the center, which is now blank, will be for the large
    image to appear.
    This is want I am aiming for: Upon MOUSE ROLLOVER on a small
    image, the large image is to appear in the center, not on top of
    the small image.
    The Large image is to come about whenever the mouse is rolled
    upon a small image.
    I am still learning Flash. Hope someone can assist me with
    the above mentioned situation.
    [email protected]

    Good point Dzedward,
    I think however that since she has only a few images, she
    could just turn her small images into buttons, create rollover
    states, and import the larger photo images into the middle space
    where she would like them.
    Should you like to try this Alice, it is extremely easy.
    turn each of your small images into buttons, double click on
    the new button, noticing now that there are four squares by the
    timeline titled "up" "over" "down", and "hit"
    Click once on the "over" box, then go to
    File....Import.....Import to Stage... scroll through your directory
    until you find the large image you desire. Import it.
    Now you can place it wherever you like, once that is
    finished, go up into the control panel between comand and window,
    then scroll down to "test movie"
    I hope this helps, and works for you.
    Should you have alot of images, this method would definately
    make your file size large, and hence upload much slower.
    Copel

  • How to create a custom measure for each level of a dimension

    Hi all!
    Can Anyone please explain me with an example, how to create a custom measure for each level for a dimension? I dont mine if you use
    one or more measures.
    thanks in advance
    hope someone helps me.

    For example:I create a dimension for product_dim witch has 4 levels:total, class, family and item:
    d_aben18
    n1_aben18
    n2_aben18
    n3_aben18
    n4_aben18
    herarchy:h_aben18
    cube:cubo_aben18
    measure:med_aben18
    I create this code to fetch the data to the dimension:
    TRAP ON CLEANUP
    SQL DECLARE c1 CURSOR FOR SELECT-
    total_product_id,1,'N1_ABEN18',total_product_dsc,-
    class_id,1,'N2_ABEN18',total_product_id,class_dsc,-
    family_id,1,'N3_ABEN18', class_id, family_dsc,-
    item_id,1,'N4_ABEN18',family_id,item_dsc-
    FROM PRODUCT_DIM
    "OPEN THE CURSOR
    SQL OPEN c1
    "FETCH THE DATA
    SQL FETCH c1 LOOP INTO-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N1_aben18_LEVELDEF,:D_ABEN18_long_description,-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N2_aben18_LEVELDEF,:D_ABEN18_parentrel,-
    :D_ABEN18_long_description,-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N3_aben18_LEVELDEF,:D_ABEN18_parentrel,-
    :D_ABEN18_long_description,-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N4_aben18_LEVELDEF,:D_ABEN18_parentrel,-
    :D_ABEN18_long_description,-
    "SAVE THE CHANGES
    UPDATE
    COMMIT
    CLEANUP:
    SQL CLOSE c1
    SHOW 'KK2'
    Then I create a cube with use compression off, and in rules sum for example.
    After, I create a measure and I select Override the aggregation specification for the cube, in rules I put nonadditive and I would like to create aprogram to assign distinct values to each level of the dimension. For example, I put 1, 2 3, and 4 values, but at the end I would like to put count(distinct(values)).
    for that I create another program:
    VRB D_RETURN DECIMAL
    if D_ABEN18_N1_ABEN18_LEVELDEF eq 'N1_ABEN18'
    then D_RETURN = 1
    if D_ABEN18_N2_ABEN18_LEVELDEF eq 'N2_ABEN18'
    then D_RETURN = 2
    if D_ABEN18_N3_ABEN18_LEVELDEF eq 'N3_ABEN18'
    then D_RETURN = 3
    if D_ABEN18_N4_ABEN18_LEVELDEF eq 'N4_ABEN18'
    then D_RETURN = 4
    else d_return=26
    return d_return
    "SHOW D_RETURN
    cubo_aben18_med_aben18_stored=d_return
    but it doesnt work.I dont know how to put to assign or to see what I want.
    I report the measure, or I report the program, but then how can I see the values of the measure?
    thanks in advance

  • How can I create a custom dock for all users?

    Hello,
    I would like to create a custom dock for everyone that uses a certain Mac. I have found a bunch of stuff, but it is outdated. Most of the tutorials are for 10.4 or 10.5. I am using 10.7.4 and I have found nothing regarding that. Can anyone point me in the right direction?
    Thanks in advance

    Hello,
    I am not sure how I wound-up in the server forum. I am using the desktop version of OS X 10.7.4.
    Thanks

  • Adobe premiere elements 12 - how to create menu bar action for my inserted image button

    adobe premiere elements 12 - how to create menu bar action for my inserted image button without using their movie menu theme

    forbemag
    I do not think that I am completely focused into this completely, so let us see if the following is going to help.
    You are going to need a base for your button. When you mention "image" button, I am assuming that you are using that term to differentiate between a text button and a thumbnail type button.
    The menus (main and scene) take their origin in .psd files on the hard drive and strict nomenclature and structure for Layers Palatte. And, the buttons on the menus trace back to the menu markers on the Timeline, main menu marker and order of placement of scene markers. The scene thumbnail will only appear when there is a scene marker on the Timeline to which it.
    In view of all that
    Where have you already inserted this "image (button)"...into the Layers Palette of a Photoshop document or other? Is this "image (button)" in a structured Layer Group in the Layers Palette with sublayer groups, text layers, graphic/background layer"?
    Let me give you an example
    If you have a button (with thumbnail) on the main menu and you want that to open to a specific scene in your movie, then you use a main menu marker on the Timeline at the spot that you want that button to target.
    If I am getting closer to what you seek, then please further clarify the DVD navigational envisioned scheme.
    Thanks.
    ATR
    Add On...I did not see the exchanges between us and SG until after I had posted mine. I thought that your discussions were concluded. Please excuse the interruption.

  • I am getting ready to sell a Mac app and I want to know what the specs are to create a custom background for my Mac App?

    I am getting ready to sell a Mac app and I want to know what the specs are to create a custom background for my Mac App?
    Here is a good example of what I am talking about: https://docs.google.com/file/d/0B28kNqQ8gmifRjRHam9wVnlrWG8/edit?usp=sharing

    You need to post your question in the Apple Developer Forums

  • Create 1 customer master for some small customer

    Hi All,
    Our company have some small customer, sometime they buy our goods (may be they buy only one time). So we want create 1 customer master for them. Can we do it?

    Dear  ngocvt,
    Transaction Code: V-07 - Create a one-time customer. (Account Group - CPDA)
    One time customer / vendor accounts in SAP means they are account groups for customer/vendor and where in only the general data of the customer / vendor are stored instead of maintaining the bank data and other company code data that are relevant for other account groups which are useful for long run purposes.
    As you know everything that is entered in SAP is saved in some TABLE. Now the customer & vendor master is such a table which holds vast amount of data.
    The business secenario where the vendor or customer which are being in system only for 1 transaction, it is not advisable to have all the data maintained in main master.
    Therefore SAP has provided with the feature of One time vendor / customer wherein in the document entry stage only you have to enter the name, address and other details of the vendor/customer.
    The data, as far as I know' remains at doc level and does'nt go to the master tables.
    If you want to change the standard functionality then go to
    Transaction OBD2, u will find CPDA, that is standard one one time customer account group.
    Copy it  and make necessary changes.
    Hope this Helps.
    Thanks
    Murtuza

  • Using Apache Commons HTTPClient to create a custom socket for Java mail

    Does anyone know how to use Apache Commons HTTPClient to create a custom socket for Java mail. This is necessary for me to use NTLM authentication

    JavaMail doesn't use HTTP.
    If you want to add support for NTLM authentication to one of the standard protocols,
    your best bet is to create a SASL provider, although note that only JavaMail's IMAP
    provider uses SASL currently. The other protocols should add SASL support, but that
    hasn't been done yet.

Maybe you are looking for