How to convert number pairs into .grd file(w/o typing them all in)

I want to be able to take a set of numbers (like coords from some shape), and use them to create a gradient file.
Example, I start w/file of:
x=0  , y=0 
x=1  , y=4 
x=2  , y=10
x=3  , y=18
x=4  , y=22
...50 lines elided...
x=75 , y=97
x=80 , y=98
x=84 , y=99
x=94 , y=100
where I would use the x as the x coord(duh), and 'y' as the 'height' of transparency
(or a brightness value that I'd combine with some desired color value to get an RGB value).
But in this simple case,
assume a a simple foregnd->backgrnd color (or any 2 color gradient @ 0 & 100), with only the transparency value needing
all the numbers ...)
(would be nice if I could just input a forumula...but.....)  barring that.. trying to figure out the .GRD
file format is proving to be a bit of a pain.
I notice lots of map-marker points like FE' (ala SVG FE function, ) values, references to doubles, etc...
but spending a bunch of time figuring out the file format seems like such a bother if it's already been done...
any scripts or tools to allow such conversions or am I stuck writing my own perl script...
(breaking it down w/vim wasn't too difficult subbing in <0> or <0000> for quads, etc...
going from that could see where numbers were wanted and convert those
to hex, <xx>;  At some point, given the 'FE' function I suspect I'll have to look up how floating point
is stored ... sigh.
See what I mean by a pain to write a script?)
Ideas/pointers?

   Odd, there was a response here by me, w/no content.   I don't remember posting 'nothing', rather than just delete it,  I thought I'd try to remember what I wrote at the time and see if it stays in the system this time.
Chris Cox wrote:
The gradient preset files are a sort of key/value pair system, but not really like XML (and are a heck of a lot faster to read and write than XML).
The file format is documented in the SDK, and has been for many years.
It's just a complex enough format that even most developers don't want to mess with it.
   Yes-- could see the key value pairs in the work I did.  that's were I found reference to a key with "FE"" in  it and thought it was related to the SVG function of the same name - as it is the gradient function in SVG, but you said above, that the FE key word in the binaries files had nothing to do with the gradient function that is in SVG by the same name (somehow I don't think you read what I was writing but sorta skimmed it.  My writing tends to alot more information in it than it appears (coincidentally, my posts tend to be longer than the average post), so it may not be that it contains more information than it _appears_, just more than the average post...and, as some may believe (not saying on the forum, but have encountered this on others)
   What is often true in writing about any topic is that, it is increasingly difficult to make my writing more concise while retaining precision -- especially if you are trying to be *clear*.  Too often, I find, that when I toss off quick notes, I'll lots of dumb looks <*huh?*? or responses (not responding to what I said) and I'll spend as much (usually more) clarifying or correcting misunderstandings, OR verifying that they were responding to or answering  was to something I actually 'said', rather than what it appeared (to me) that they were responding to.
   As for the bit about developers touching old code...that's common in almost every project...no one wants to touch something that is currently working, as even though they may be adding improvements or fixing a problem, it is certain they will change the code in a way that it doesn't behave precise as it did before (by definition, else why make changes?), and as a result, they may get complaints from some people who were using that code in some completely unexpected way which now breaks in the new code (even though the documented behavior may be unchanged).
   This is a major problem, since I have NEVER scene documentation that explains all the inter-relations and behaviors of a program, yet often, it is *expected* that people will use those undocumented interrelations to do anything other than the most basic functions.  Note -- by undocumented, I also include things that may be discerned via induction on the various pieces but are not  explicitly spelled out (thus open to 'reinterpretation' at some later point...).
   It seems, almost inherently, that they thorough documentation of code would be NOT just the code, but also design documents and notes -- which would not happen in almost any project (maybe a government funded security program), but would also be impractical as a an easy to use reference (I.e. that would need to be written as well).  As it is, some programs simply come with installation instructions and/or installation support.
   Anyway, hopefully, this answer will get posted and stay (don't know what happened to previous)...(failure in submission or bit-rot).
Astara

Similar Messages

  • How to convert database table into xml file

    Hi.
    How to convert database table into XML file in Oracle HTML DB.
    Please let me know.
    Thanks.

    This not really a specific APEX question... but I search the database forum and found this thread which I think will help
    Exporting Oracle table to XML
    If it does not I suggest looking at the database forum or have a look at this document on using the XML toolkit
    http://download-east.oracle.com/docs/html/B12146_01/c_xml.htm
    Hope this helps
    Chris

  • How to convert alv list into excel file?

    Hi Experts,
            i have created one report for Due Date Analysis.
    Now My output is displaying in ALV list. But I need to convert the data which in alv list into Excel File. then only i have to send the Excel File to the Customer Thro Email.
         So i need the Function Module to Convert the Data into Excel File.
    Thanks,
    Neptune.M

    Hi,
      U can use function module gui_download.
      CALL FUNCTION 'GUI_DOWNLOAD'
         EXPORTING
        BIN_FILESIZE       =
          filename           = 'C:\Transportaionlane.XLS'
          filetype                       = 'DAT'
        WRITE_FIELD_SEPARATOR           = ' '
        HEADER                          = '00'
        TABLES
          ata_tab                       = t_trans_lane_dis[]
           OTHERS                          = 22
    if u want with header then pass the header.
    regards
    Ahasan

  • How to convert jpeg images into video file of any ext using JMF

    I want to convert the Jpeg files into video clip with the help of JMF
    any one can help me?
    Plz reply me at [email protected]
    or [email protected]

    I'm not sure of his/her reasoning behind this, but I have yet to find a way to record video with mmapi on j2me. So with that restriction, I can see how one could make it so that it just records a lot of jpegs, and then makes it a movie.
    I would be interested finding a workaround for this too. Either if someone would explain how to record video with mmapi or how to make recorded images into a video. Thanks!

  • How to convert iTunes songs into MIDI files?

    I want to copy an iTunes song and convert the copied song into a MIDI file. How do I do this?

    Can't be done...
    A MIDI file is a set of instuctions for making music. Play this note, then, for that long, on this particular instrument, with these settings. Multiplied by as many notes and instruments as are required. A MIDI file can be turned into music automatically. Turning music into the instructions to make it is, as far as I am aware, beyond the capabilities of current software.
    tt2

  • How to convert a string into xml file

    Hi,
    i have a string . the string contain fully formated xml data. i mean my string like below
    <?xml version="1.0"?>
    <PARTS>
       <TITLE>Computer Parts</TITLE>
       <PART>
          <ITEM>Motherboard</ITEM>
          <MANUFACTURER>ASUS</MANUFACTURER>
          <MODEL>P3B-F</MODEL>
          <COST> 123.00</COST>
       </PART>
       <PART>
    ......................i want to convert it into an xml file
    can u help me?
    thank u

    Thank you Paul Clapham,
    and sorry ..
    i have some other doubt.. regarding xml
    i want to post an XML file from one server(Server_1) to other server.(Server_2)
    To generate an xml file i used DOM in Server_1.
    using xml.transform , StringWriter i converted it into String.
    I post the string to another server and there i will parse it.
    for that i write the code like below in servlet in server_1
    <form name=fn action=http://localhost:8080/server_2/parseXMl.do method=post>
    <input type=hidden name=xmlFile value="+Xmlstring+">
    <input type=submit >is this process is correct?
    Some of the turorial told that use web-services/XML-RPC
    but i new to both..
    I want to complete it using my knowledge only/
    Is it possible to do it?
    Or any other alternative?
    can help me?

  • How to convert number field into time

    Hi
    I have made a form for storing of private dialed calls from different extensions. To store call duration i have assigned a number field which is storing following type of data
    1.34
    1.19
    37.29
    1.47
    In above mentioned data decimals are seconds and left side is minutes.
    Now the requirement is that if second is > 30 then 1 minute should be added in minutes else 30 seconds should appear instead of original seconds.
    Please Help!

    >
    To store call duration i have assigned a number field which is storing following type of data
    In above mentioned data decimals are seconds and left side is minutes.
    >
    Please provide info about the form in which you RECEIVE the data. Do you receive the data in MM.SS format like you say you are storing it?
    If not, why are you storing it this way?
    Unless you have some reason to STORE the data differently just store it the way you got it. That way you won't lose any precision and you can manipulate it any way you need to for display purposes.
    If you receive START_TIME and END_TIME then store both of those. Don't calculate and store duration; you will lose END_TIME and if you later need to calculate duration to a different precision you won't be able to.
    Where is the data being stored? Oracle?
    Write a simple function to convert a duration to minutes and seconds using the '>30' rule you have. Then if the rule changes you can write a new function or modify the existing one and the data itself doesn't have to change.

  • How to convert erl scripts into single exe file ?

    hi
    this is not related to java. Does anybody know how to convert perl scripts into exe file in non-readable format?
    regards
    venki

    I believe that ActiveState used to do a Perl compiler.....not sure if they still do and I don't think it was free anyway. Check around their website...
    http://www.activestate.com/

  • Anyone know how to convert a 3D sphere .STL file into a .igs file?

    Anyone know how to convert a 3D sphere .STL file into a .igs file?

    And for what? Why? This would be kinda atrocious and awful, but weird things happen...
    Mylenium

  • How to convert table content into html format?

    Hi,
    Experts,
    How to convert internal data into HTML format is there any function module or piece of code to download content into HTML.
    Thank u,
    Shabeer Ahmed.

    Then use this code....
    REPORT  ytest_table_html1.
    *        D A T A   D E C L A R A T I O N
    *-HTML Table
    DATA:
      t_html TYPE STANDARD TABLE OF w3html WITH HEADER LINE,
                                           " Html Table
    *- Declare Internal table and Fieldcatalog
      it_flight TYPE STANDARD TABLE OF sflight WITH HEADER LINE,
                                           " Flights Details
      it_fcat TYPE lvc_t_fcat WITH HEADER LINE.
                                           " Fieldcatalog
    *-Variables
    DATA:
      v_lines TYPE i,
      v_field(40).
    *-Fieldsymbols
    FIELD-SYMBOLS: <fs> TYPE ANY.
    *        S T A R T - O F - S E L E C T I O N
    START-OF-SELECTION.
      SELECT *
        FROM sflight
        INTO TABLE it_flight
        UP TO 20 ROWS.
    *        E N D - O F - S E L E C T I O N
    END-OF-SELECTION.
    *-Fill the Column headings and Properties
    * Field catalog is used to populate the Headings and Values of
    * The table cells dynamically
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = 'SFLIGHT'
        CHANGING
          ct_fieldcat            = it_fcat[]
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2.
      DELETE it_fcat WHERE fieldname = 'MANDT'.
      t_html-line = '<html>'.
      APPEND t_html.
      CLEAR t_html.
      t_html-line = '<thead>'.
      APPEND t_html.
      CLEAR t_html.
      t_html-line = '<tr>'.
      APPEND t_html.
      CLEAR t_html.
      t_html-line = '<td><h1>Flights Details</h1></td>'.
      APPEND t_html.
      CLEAR t_html.
      t_html-line = '</tr>'.
      APPEND t_html.
      CLEAR t_html.
      t_html-line = '</thead>'.
      APPEND t_html.
      CLEAR t_html.
      t_html-line = '<table border = "1">'.
      APPEND t_html.
      CLEAR t_html.
      t_html-line = '<tr>'.
      APPEND t_html.
      CLEAR t_html.
    *-Populate HTML columns from Filedcatalog
      LOOP AT it_fcat.
        CONCATENATE '<th bgcolor = "green" fgcolor = "black">'
            it_fcat-scrtext_l
            '</th>' INTO t_html-line.
        APPEND t_html.
        CLEAR t_html.
      ENDLOOP.
      t_html-line = '</tr>'.
      APPEND t_html.
      CLEAR t_html.
      DESCRIBE TABLE it_fcat LINES v_lines.
    *-Populate HTML table from Internal table data
      LOOP AT it_flight.
        t_html-line = '<tr>'.
        APPEND t_html.
        CLEAR t_html.
    *-Populate entire row of HTML table Dynamically
    *-With the Help of Fieldcatalog.
        DO v_lines TIMES.
          READ TABLE it_fcat INDEX sy-index.
          CONCATENATE 'IT_FLIGHT-' it_fcat-fieldname INTO v_field.
          ASSIGN (v_field) TO <fs>.
          t_html-line = '<td>'.
          APPEND t_html.
          CLEAR t_html.
          t_html-line = <fs>.
          APPEND t_html.
          CLEAR t_html.
          t_html-line = '</td>'.
          APPEND t_html.
          CLEAR t_html.
          CLEAR v_field.
          UNASSIGN <fs>.
        ENDDO.
        t_html-line = '</tr>'.
        APPEND t_html.
        CLEAR t_html.
      ENDLOOP.
      t_html-line = '</table>'.
      APPEND t_html.
      CLEAR t_html.
    *-Download  the HTML into frontend
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = 'C:\Flights.htm'
        TABLES
          data_tab                = t_html
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    *-Display the HTML file
      CALL METHOD cl_gui_frontend_services=>execute
        EXPORTING
          document               = 'C:\Flights.htm'
          operation              = 'OPEN'
        EXCEPTIONS
          cntl_error             = 1
          error_no_gui           = 2
          bad_parameter          = 3
          file_not_found         = 4
          path_not_found         = 5
          file_extension_unknown = 6
          error_execute_failed   = 7
          synchronous_failed     = 8
          not_supported_by_gui   = 9
          OTHERS                 = 10.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    none of the above function modules r obsolete...

  • How to convert DataServices.Result into an Arraylist or ArrayCollection?

    I want to use an ArrayCollection or an ArrayList as a data provider
    for a dataGrid, and then later in a Graph.
    The problem is that the starting point is the FLEX Builder 4 created "datasource.lastResult" value Objects.
    I don't know how to access anything but the Column names.
    The fields returned are:
         gmtdate,hostname,CPUBusy
    I want to show CPU busy for "N" number of hosts.
    So I need to change my result from the SQL query in Action Script into:
        gmtdate, hostname1_CPUbusy, hostname2_CPUbusy, hostnameN_CPUbusy
    Are there any samples of how to convert the .lastResult into an ArrayList?
    The result set is Object based and I can't figure out how to read it.
    Thanks,
    David

    I wish I could change it, but Oracle SQL does not allow for an unknown number of hosts.
    Nor does this version of Oracle have the new pivot function.
    David

  • How to convert word doc into pdf - which product of adobe i need to use- what upgrades - am a newbie

    How to convert word doc into pdf - which product of adobe i need to use- what upgrades - am a newbie -  simple answers please - Thanks in advance.

    @Pipeline2007 - which version of Microsoft Office have you got? Older versions of Acrobat aren't compatible with the latest versions of Office, see this link for info:
    http://helpx.adobe.com/acrobat/kb/compatible-web-browsers-pdfmaker-applications.html

  • I know that how to convert any documents to pdf file, but don't know how to get barcode on it. I am using windows 8.1. and want to see barcode on my documents before the print. Please help.

    I know that how to convert any documents to pdf file, but don't know how to get barcode on it. I am using windows 8.1. and want to see barcode on my documents before the print. Please help.

    Hi Frank ,
    Please refer to the following link and see if this helps.
    https://helpx.adobe.com/acrobat/kb/error-organizer-database-damaged-reset-1.html
    Regards
    Sukrit Dhingra

  • How to convert Date format into day in ssrs reports?

    Hi
    How to convert date format into day?
    10/01/2010 as like Monday like that?

    =weekdayname(datepart("w",Fields!mydate.Value))
    -Vaibhav Chaudhari

  • How to convert mp3 songs into mp4

    Help?

    An mp4 is a video format. You can add an mp3 music files as the sound track of a video.
    Do you mean you want to convert a mp3 to a ma4 (used for ringtones)? Id so then
    http://www.switchingtomac.com/tutorials/how-to-convert-an-mp3-or-m4a-file-to-an- iphone-ringtone/

Maybe you are looking for

  • HT1338 My ipod froze up. I cant do anything not even turn it off.HELP.

    My ipod froze. I can not torn it off. I cant do anything. It has changed pic and dates by itself. Is it dead? Do I need to get a new one? If you could help me figue this problem out it would be Greatly Appreciated.

  • Director 10.1.1

    I am trying to update to 10.1.1 from 10.1.0 in order to install swf files. With 10.1.0 I keep getting a 1 frame swf that doesn't play. Reading this forum I found that I may need 10.1.1 for Flash 8 files. This is the link I went to: 10.1.1updateAfter

  • Caesar Cipher and non printing ascii

    I am writing a program to implements the caesar cipher. For the program I am using ASCII code so my encryption algorithm is: c = (p + k) mod 128 The only problem is, is that depending on the characters being encrypted and depending on the key I use s

  • Cuando se solucionarán los problemas de compatibilidad de photoshop cc 2014 con la tableta Wacom pro.

    En Photoshop cc con windows 8.1 pro y tableta Wacom pro los márgenes de la pantalla no están ajustados el puntero se desplaza fuera de los márgenes y aparece en el lado opuesto. Pero que se ha solucionado en Photoshop cc 2014 pero que han surgido nue

  • OCP DBA Training

    I am preparing for Oracle 8i DBA Certification anybody can sagest me sum online Free materials and E-learning Sources