How to read path data?
Hello, I'm new to photoshop plugin development, and wondering how to read the path data in plugin? That is, the data generated by the pen tool.
Thanks.
From PIProperties.h
* Contents of the indexed path in the format described
* in the path resources documentation; (Complex, read-only).
* The paths are indexed starting with zero. The data is stored in big
* endian form. Refer to chapter 10 for more information on path data.
#define propPathContents 'path'
From the file formats document I get this. Hopefully that gets the answer for you!
Path resource format
Photoshop stores the paths saved with an image in an image resource block. These resource blocks consist of a series of 26-byte path point records, so the resource length should always be a multiple of 26.
Photoshop stores its paths as resources of type 8BIM , with IDs in the range 2000 through 2999. These numbers should be reserved for Photoshop. The name of the resource is the name given to the path when it was saved.
If the file contains a resource of type 8BIM with an ID of 2999, then this resource contains a Pascal-style string containing the name of the clipping path to use with this image when saving it as an EPS file.
The path format returned by GetProperty() call is identical to what is described below. Refer to the IllustratorExport sample plug-in code to see how this resource data is constructed.
Path points
All points used in defining a path are stored in eight bytes as a pair of 32-bit components, vertical component first.
The two components are signed, fixed point numbers with 8 bits before the binary point and 24 bits after the binary point. Three guard bits are reserved in the points to eliminate most concerns over arithmetic overflow. Hence, the range for each component is 0xF0000000 to 0x0FFFFFFF representing a range of -16 to 16. The lower bound is included, but not the upper bound.
This limited range is used because the points are expressed relative to the image size. The vertical component is given with respect to the image height, and the horizontal component is given with respect to the image width. [ 0,0 ] represents the top-left corner of the image; [ 1,1 ] ([ 0x01000000,0x01000000 ]) represents the bottom-right.
In Windows, the byte order of the path point components are reversed; you should swap the bytes when accessing each 32-bit value.
Path records
The data in a path resource consists of one or more 26-byte records. The first two bytes of each record is a selector to indicate what kind of path it is. For Windows, you should swap the bytes before accessing it as a short.
Path data record types
Selector
Description
0
Closed subpath length record
1
Closed subpath Bezier knot, linked
2
Closed subpath Bezier knot, unlinked
3
Open subpath length record
4
Open subpath Bezier knot, linked
5
Open subpath Bezier knot, unlinked
6
Path fill rule record
7
Clipboard record
8
Initial fill rule record
The first 26-byte path record contains a selector value of 6, path fill rule record. The remaining 24 bytes of the first record are zeroes. Paths use even/odd ruling. Subpath length records, selector value 0 or 3, contain the number of Bezier knot records in bytes 2 and 3. The remaining 22 bytes are unused, and should be zeroes. Each length record is then immediately followed by the Bezier knot records describing the knots of the subpath.
In Bezier knot records, the 24 bytes following the selector field contain three path points (described above) for:
the control point for the Bezier segment preceding the knot,
the anchor point for the knot, and
the control point for the Bezier segment leaving the knot.
Linked knots have their control points linked. Editing one point modifies the other to preserve collinearity. Knots should only be marked as having linked controls if their control points are collinear with their anchor. The control points on unlinked knots are independent of each other. Refer to the Adobe Photoshop User Guide for more information.
Clipboard records, selector=7 , contain four fixed-point numbers for the bounding rectangle (top, left, bottom, right), and a single fixed-point number indicating the resolution.
Initial fill records, selector=8 , contain one two byte record. A value of 1 means that the fill starts with all pixels. The value will be either 0 or 1.
Similar Messages
-
How to read the data in excel sheet
Dear sir,
How to read the data in excel sheet when i recieve a data serial communication... ie i have store a data in excel such that
Cell A Cell B
A Apple
B Ball
C Cat
D Doll
when i recieve A from serial communication i have to display Apple, and when i recieve B i have to display Ball and so on..Hi,
I would recommend you to have a look at the VI attached. It makes use of a VI named 'Read from Spreadsheet' to read the row and column data from the tab delimited excel file. The read data is then searched for the Alphabet specified and finally returns you the corresponding string. The test file used to validate the operation of the VI is also attached.
Trust this would help you solve the issue.
Regards,
Sagar G Yadav | Application Engineer | National Instruments
Attachments:
read_from_excel.vi 10 KB
Book1.txt 1 KB -
How to read a data from USB port using JAVA
hi all,
i need to know how to read a data from USB port using java. any API are available for java ?.........please give your valuable ideas !!!!!!!!!
Advance Thanks!!You can do this. Please use this link
[http://www.google.co.in/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=uHu&q=java+read+data+from+usb+port&btnG=Search&meta=&aq=f&oq=]
What research did you do of your own? Have you done some testing application and tried yourself?? -
How to read the data from Excel file and Store in XML file using java
Hi All,
I got a problem with Excel file.
My problem is how to read the data from Excel file and Store in XML file using java excel api.
For getting the data from Excel file what are all the steps i need to follow to get the correct result.
Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
Thanks & Regards,
Sreenu,
[email protected],
india,If you want someone to do your work, please have the courtesy to provide payment.
http://www.rentacoder.com -
Hi all, I'm new to using the labview, and I have some trouble doing my project using the labview software.
I have been trying to use the spectrum analyzer (Anritsu MS2661C) which connect to computer using the GPIB connection.
I have got the instrument driver which can write and control the instrument using Labview 2010.
and my Question is how do read the data or result from the spectrum analyzer and send it to the microsoft excel?
Do I need to use other software or programming to do this step?
If anyone know how is this done, please let me know.
Regards,
EryHi ery,
In order to send data that you have read in from an instrument to Excel, the most convenient way to do this would be to use our Report Generation Toolkit. The Report Generation Toolkit is a very useful tool that allows you to interface to Microsoft Office software from LabVIEW, including Word and Excel. I am not sure if you are familiar with this, but I have attached a link that explains more about the Report Generation Toolkit below.
Another way would be to use the Write To Spreadsheet File VI. While this will store your data to a spreadsheet data file, it will not allow you to programmatically perform any Excel formatting like the Report Generation Toolkit offers. I have also attached a link to some information on the Write To Spreadsheet VI below.
Also, be sure to check out the Example Finder in LabVIEW for a number of examples on how to write data to a spreadsheet file. From LabVIEW, you can go to Help»Find Examples to launch the Example Finder. From there, you can search for "spreadsheet," which should populate examples for use in different applications. I hope this helps, ery. Please let me know if you have any further questions about these!
NI LabVIEW Report Generation Toolkit for Microsoft Office
Write To Spreadsheet File VI
Taylor G.
Product Support Engineer
National Instruments
www.ni.com/support -
How to read the date and time information of a file by labview
how to read the date and time information of a file by labview? for example, created time and modified time.
Solved!
Go to Solution.if you need to know the last modification date of file:-
"Functions->File I/O->Advanced File Functions->File/Directory Info.vi"
This vi returns the value of file's last modification date. This is returned as U32 number. To see it in MM/DD/YY format you must create the indicator, right-click on it and select "Format & Precision" item from drop-down menu. Then select "Time and Date" format there.
Thanks as kudos only -
How to read XI Data type in Java code and populate as array list, using UDF
Hi,
How to read XI Data type in Java code and populate as array list, using UDF?
Is there any API using which the XI data types can be read?
Kindly reply.
RichaInput Structure:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:CustomerCreateResp xmlns:ns0="urn:bp:xi:up:re:cust_mdm:cmdm:pr5:100">
<CUSTOMER>
<item>
<CUSTOMERNO/>
<MDMCUSTOMER/>
<CREATE_DATE/>
<RETURN>
<TYPE/>
<MESSAGE/>
</RETURN>
<PT_CONTPART_RETURN>
<item>
<MDM_CONTACT/>
<CONTACT/>
</item>
</PT_CONTPART_RETURN>
<PARTNERS>
<item>
<CUSTOMERNO/>
<PARTNER_FUNCTION/>
<PARTNER_NUMBER/>
<DEFAULT_PARTNER/>
</item>
</PARTNERS>
</item>
</CUSTOMER>
</ns0:CustomerCreateResp>
Output structure
(Sample output structure.This actually needs to be mapped and generated using UDF)
<?xml version="1.0" encoding="UTF-8"?>
<ns1:updateCustomer xmlns:ns1="urn:xiSericeVi"><ns1:customer><ns2:ArrayList xmlns:ns2="java:sap/standard">[]</ns2:ArrayList></ns1:customer><ns1:name>2344566</ns1:name></ns1:updateCustomer> -
How to read master data?
Can anyone tell me the procedure how to read master data?
Hi,
I am sorry but your question is a bit vague. What do you mean by your statement? Can you please elaborate your requirement. -
How to read saved data in BPC 7 Nw Script Logic
Hi all,
I am trying to write the logic for Price*Quantity Calculation. This logic should be executed whenever user saves the data for either Quantity or Price.
For this i created a Implementation on BADI "UJ_CUSTOM_LOGIC". But i am struck on how to read the data from InfoCube ,Like if user saves "Quantity",logic should read "Price" from the cube and calculate the result, Which is equivalent to GET(------) statement in SQL script Logic. Which method should i call to read the saved data in cube.
Appreciate if someone can help me on this.
Thanks&Regards,
Ashok Kumar.Hi,
You can use the LOOKUP instruction like:
*LOOKUP RATE
*DIM ENTITY2="DEFAULT"
*DIM SOURCECURR:INPUTCURRENCY=ENTITY.CURR
*DIM DESTCURR1:INPUTCURRENCY="USD"
*DIM DESTCURR2:INPUTCURRENCY="EURO"
*DIM RATE=ACCOUNT.RATETYPE
*ENDLOOKUP
Best regards,
Mihaela -
How to read the data from a column that is in clob data type (but XMLdata)
Hi ,
I have a table XYZ which has a column RESPONSE_XML in clob datatype format.we can convert it to XMLTYPE(RESPONSE_XML) to read the data in XML format.
Now this is the DynamicXML schema file. Here I want to see all the COMMONNAME, ResourceDescribedby_VALUE into column_A, ResourceDescribedby_ResourceSpecCharacteristic_Name tags into column_B
How can I do that .. any suggestions please ..
Here is a sample XML:
<?xml version="1.0" encoding="WINDOWS-1252" ?>
_- <soap:Body>
- <SearchResourceResponse xmlns="http://www.google.com/google.xsd">
- <MessageElements xmlns:tns="http://www.www.google.com/google.xsd" xmlns="">
<MessageStatus>SUCCESS</MessageStatus>
- <MessageAddressing>
<from>gmail</from>
<to>Gmail SOAPTester</to>
<messageId>1234</messageId>
<action>SearchResource</action>
<transactionId>OR</transactionId>
<ServiceName>SearchResource</ServiceName>
<ServiceVersion>1.1</ServiceVersion>
</MessageAddressing>
</MessageElements>
-<SearchResponseDetails xmlns:tns="http://www.www.google.com/google.xsd" xmlns="">
- <SubNetwork>
- <Pipe xsi:type="icl:Trail" xmlns:icl="http://www.www.google.com/google.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CommonName>318-223-4675</CommonName>
<objectID>91535716980514105329</objectID>
<SourceSystem>MARS</SourceSystem>
- *<ResourceDescribedBy> <value>RDSSLA</value>* *<ResourceSpecCharacteristic> <name>*CentralOfficeCode</name> </ResourceSpecCharacteristic>
</ResourceDescribedBy>
- <ResourceRelationship>
- <Resource xsi:type="icl:Trail">
- <ResourceDescribedBy> <value>001</value> - <ResourceSpecCharacteristic> <name>AssignLocationExternalFormat</name> </ResourceSpecCharacteristic>
</ResourceDescribedBy>
- <ResourceDescribedBy> <value>001</value> - <ResourceSpecCharacteristic> <name>PairVerticalExternalFormat</name> </ResourceSpecCharacteristic>
</ResourceDescribedBy>
- <ResourceDescribedBy> <value>001</value> - <ResourceSpecCharacteristic> <name>PairVerticalInternalFormat</name> </ResourceSpecCharacteristic>
</ResourceDescribedBy>
- <ResourceDescribedBy> <value>+</value> - <ResourceSpecCharacteristic> <name>PairVerticalSign</name> </ResourceSpecCharacteristic>
</ResourceDescribedBy>
- <ResourceDescribedBy> <value>RDSSLA</value> - <ResourceSpecCharacteristic> <name>CentralOfficeCode</name> </ResourceSpecCharacteristic>
</ResourceDescribedBy>
- <ResourceDescribedBy> <value>B</value>- <ResourceSpecCharacteristic> <name>EntityType</name> </ResourceSpecCharacteristic>
</ResourceDescribedBy>
- <ResourceType>FeederCircuit</ResourceType>
- <LogicalPhysicalResource>
- <PhysicalResource xsi:type="icl:PhysicalConnector">
<usageState>S</usageState>
- <ResourceDescribedBy> <value>25.392</value> - <ResourceSpecCharacteristic> <name>CableLength</name> </ResourceSpecCharacteristic>
</ResourceDescribedBy>
</PhysicalResource>
</LogicalPhysicalResource>
- <TerminationPoint xsi:type="icl:TrailTerminationPoint">
<CommonName>1000/34A</CommonName>
- </Resource>
</ResourceRelationship>
<lrStatus>W</lrStatus>
</Pipe>
</SubNetwork>
</SearchResponseDetails>you don't appear to have posted valid XML, so I can't reproduce using your example, but you will need to look at something like this:
select xtab.common_name
from your_table yt
,xmltable('/SearchResourceResponse'
passing xmltype(yt.response_xml)
columns
common_name varchar2(20) path 'SearchResponseDetails/CommonName'
) xtab
; -
How to read the data from excel file and store into the table?
Hi All,
I have table with BLOB datatype contains a excel file. I have to read that data from excel and store into one table with all the fields in excel.
All the excel fields and my table columns are same.
Can you share with me how can acheive this using LOB's?
ThanksHi OraSuirya,
you can try with external tables .
syntax as follows
create table ext_table_csv (
i Number,
n Varchar2(20),
m Varchar2(20)
organization external (
type oracle_loader
default directory ext_dir
access parameters (
records delimited by newline
fields terminated by ','
missing field values are null
location ('file.csv')
reject limit unlimited;
For this you need to create directory
Directory Creation syntax:
create or replace directory ext_dir as 'D:\oracle\user_dir\ext_dir';
grant read, write on directory ext_dir to <User>;
please paste the excel file in the particular directory .
I hope this will help you.
Please correct me if I am wrong anywhere .
Thanks,
Tippu. -
How to read the data from an internal table,when column names are known
Hi All
I have a specific requirement. I got an internal table with many fields (let it be my_tab). Some of the fieldnames (column names in internal table my_tab) are stored in separate internal table(let it be my_fields).
I need to store/read data corresponding to the fields (whose name is stored in my_fields) from my_tab.
I am able to build dynamic table (referred by field-symbol) with respect to the given field names in my_fields.
But i am unable to read the data corresponding to the fieldnames from my_tab.
Please provide me some pointer in this regard.
Regards
Swetabh ShuklaHI All
Thanks for the prompt response. I got solution for my question. Please check below thread. For quick reponse i posted my question in one more category. Thanks to all of you.
How to read internal table w.r.t. fieldnames stored in other table -
How to read the data from a sorted table
Hi all,
How to read data from the sorted tables. Please provide some examples.
Thanks and regards,
LisaYou can read like this :
DATA: BEGIN OF LINE,
COL1 TYPE I,
COL2 TYPE I,
END OF LINE.
DATA ITAB LIKE SORTED TABLE OF LINE WITH UNIQUE KEY COL1.
DO 4 TIMES.
LINE-COL1 = SY-INDEX.
LINE-COL2 = SY-INDEX ** 2.
INSERT LINE INTO TABLE ITAB.
ENDDO.
CLEAR LINE.
READ TABLE ITAB WITH TABLE KEY COL1 = 3
INTO LINE TRANSPORTING COL2.
WRITE: 'SY-SUBRC =', SY-SUBRC,
/ 'SY-TABIX =', SY-TABIX.
SKIP.
WRITE: / LINE-COL1, LINE-COL2. -
How to read the data from a file in another computer with user name and password login
How to read read the data from a file in anohter computer which need to login with user name and password?
duplicate post: http://forums.ni.com/t5/LabVIEW/log-on-the-other-computer-with-user-name-and-password/m-p/2061478
duplicate post: http://forums.ni.com/t5/LabVIEW/do-need-to-enter-the-user-name-and-password-when-TCP-ip/m-p/2061612
duplicate post http://forums.ni.com/t5/LabVIEW/log-on-the-other-computer-with-user-name-and-password/m-p/2060682 -
How to read the data of a file using upload option....
Hi Frndz..
As per my requirment , i need to provide a upload UI to the user , so he can select file to be upload whenever user select the file n clicks on upload button i need to read the data of that fiel that user selects.
I have a solutions for this in JSP/JAVA , but i was unable to handle this in web dynpro..c this link in jsp ..
http://www.roseindia.net/jsp/fileupload.shtml
Thanks in Advance..
Regards
RajeshHi,
Create a Value attribute (resource) of type Resource, bind it with the property of File Upload UI element.
On action place the code and Deploy the application
byte[] bytes = new byte[ 1024];
FileOutputStream out = new FileOutputStream( new File( <path in server>));
InputStream in = resource.read( true);
int len;
while( ( len = in.read( bytes)) > 0)
out.write( bytes, 0, len);
in.close();
out.close();
Regards
Vinod V
Maybe you are looking for
-
i share an apple ID for itunes with 2 separate iphones, i update IOS to 6.1 2 months ago, my contacts megered on phones and now i get the same text messages on both phones. How do i fix this?
-
Error When Signing a Document (Using a new digital ID)
After designating a digital signature and attempting to save, I receive the following error: Creation of this signature could not be completed. Could not create appearance stream. I attempted to try this on another computer and still the same error.
-
Prepared statements related problem
Hi, i have this strange problem with prepared statements i think. When i execute an insert query without prepared statements i works fine (always), when i use prepared statements it sometimes gives a db error saying i'm trying to insert a null value.
-
Define Inbound Interface for Interface Mapping with Java functions
Hi, we are developing an R/3-XI-ITK-SBO system. We realized our SOAP component as custom java functions and we installed it on ITK. We need to import and configure these functionality in XI because we need to reference to it when we define the Messag
-
Error message : "Preflight.dll is missing or corrupt"
Hi, I'm currently converting a bunch of PDF thesis into PDF/A 1-b through an Action (batch processing). Some of them resist conversion : Acrobat displays an error message : "Preflight.dll is missing or corrupt". If I do it manually (open the PDF docu