Psd file format specification how get the pixel values
Hello
I'm trying to convert psd to xml and get all information from layers
I already got all necessary info but for example the radius in rounded rectangle is in math double format but I need to have it in pixels.
I'm using Adope photoshop file format specification but there is no information how to convert double values to pixels,
The same is with colors that also given in double.
I need to know how to convert these values to actual values
Thanks
Hi,
You can't do that. You have to format the numbers before you print them. Take a look at the decimal format class:
http://java.sun.com/j2se/1.5.0/docs/api/java/text/DecimalFormat.html
/Kaj
Similar Messages
-
Why Acrobat x professional is changing the text formatting specifically the font family and the font size of the text in my pdf on exporting it to Microsoft word file format ?How should i stop Acrobat x professional from doing that so that i get an exactly same word file on exporting it from its pdf counterpart?
I was testing the preciseness & efficiency of Adobe acrobat x professional's doc conversion capabilities. As i have to take a document editing project in future which is going to need lot of pdf to word and vice versa conversions . What I did was I created a test word document converted into a pdf using a pdf maker in my word 2007 , Acrobat did convert the document from word to pdf keeping everything in the source file intact , However when i tried the other way round and attempted to convert the same pdf to word 2007 file format I lost my formatting ?So the font that I used to create the pdf are the ones taken from word 2007 which i believe is using the fonts that are installed in my computer. Any suggestions on how to preserve the formatting of the document after converting it from pdf to word file format?
Regards
Mike -
I need to update specific records(of variable lengths) in a file. I can get the correct record but when I update it(add or change info), it overwrites part of the record following it. I am using labview 6.0. I need to be able to insert information into the middle of a file without disturbing the data before and after
It's hard to give more specifics without more detail, but in general you're going to need to read in the entire file, split it into three pieces (everything before the record of interest, the record itself, and everything after the record of interest), modify the record, reassemble the three pieces in proper order, and write the whole thing back to the file.Of course if the file is very large you might not want to actually implement it this way, but conceptually at least, this is what you are looking at.If this file some sort of proprietary format?Mike...PS: this type of issue is why I really like databases...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps -
Two questions about the PSD file format specicaition
I'm a programmer dealing with a project to parse PSD files. When reading the official file format specification, I found that some fields of the file are not clarified:
1. There is a rectangle structure containing 4 fields: top, left, buttom, right. I wanna know whether these 4 fields can be negative values and is there a rule that the buttom shoud be larger than the top and the right shoud be larger than the left
2. The PSD file contains a color mode section. But if the color mode is RGB, the color mode section contians no data but a 4-byte length field whose value is set to 0. This is true for files in RGB mode 8-bit channel. But after convert the files to RGB mode 32-bit channel using photoshop, the whole color mode section is no long exist.
These two questions may be somehow technical, I would be thankful if someone can give me a hand.1) was covered in the documentation at one time. Yes, many of them can be negative, that's why they're signed values. Valid rectangles will have the bottom greater than the top, and the right greater than the left. But you can also have empty rectangles, and sometimes invalid rectangles (because the values don't matter).
2) Not sure what you're asking... color mode is just a single enumeration for RGB, CMYK, etc. -
How can i get the all values from the Property file to Hashtable?
how can i get the all values from the Property file to Hashtable?
ok,consider my property file name is pro.PROPERTIES
and it contain
8326=sun developer
4306=sun java developer
3943=java developer
how can i get the all keys & values from the pro.PROPERTIES to hashtable
plz help guys..............The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
InputStream is = new FileInputStream("tivoli.properties");
props.load(is); -
I am using itunes 10 and trying to consolidate my files. I keep getting the error "Copying files failed. The file name was invalid or too long". How can I indentify what file is causing this problem or resolve this issue?
BUMP
Yes, I just get that message. I don't see how I could investigate this problem.
I didn't mention that this happened when I was consolidating my library, not copying files to another computer.
In other words, I'm using a "normal" itunes procedure, itunes won't complete it, and won't tell me exactly why or how to figure out how to fix it...
Is there at least some easy way to tell which files were successfully copied to my itunes music folder so I can work on moving the uncopied files?
Can anybody help me? -
How to get the attribute value of an XML file??
How to get the attribute value of an XML file??
For example, how to get name and age attributes?
<student name="Joe" age="20" />What are you using to read the XML file??
On the assumption of JDOM - www.jdom.org. Something along the lines of:SAXBuilder builder = new SAXBuilder(true);
Document doc = builder.build(filename);
Element root = doc.getRootElement();
List children = root.getChildren();
Element thisElement = (Element)children.get(n);
String name = thisElement.getAttributeValue("name")
try
int age = Integer.parseInt(thisElement.getAttributeValue("age"));
catch (Exception ex)
throw new InvalidElementException("Expected an int.....");
}Ben -
I am getting this popup error when trying to open a .gif file:
"Could not complete your request because the file-format module cannot parse the file."
This comes up every time I try to open a .gif file. Even if I make a .gif file (like the image included in this post), save it and then try to open it again, I get the same error. I tried reinstalling CS4, but the error is still there. I have also done the reset on start-up and nothing. Some have suggested that I open it in (Windows XP Pro) MS Paint and then save it again. Did it and this does NOT work for me, either.
I know it's a Photoshop problem because I can see this file everywhere, except Photoshop. It will open here, there and everywhere, except for Photoshop.
I've searched the Adobe Commmunity and it looks like no one has come up with a fix for this. I'm just currious after 5 years with this problem, has there been a solution?
ScottOne of the files that has the error is in my first post.
Adobe Photoshop Version: 11.0
Operating System: Windows XP 32-bit
Version: 5.1 Service Pack 3
System architecture: AMD CPU Family:15, Model:10, Stepping:0 with MMX, SSE Integer, SSE FP, SSE2
Physical processor count: 6
Processor speed: 3210 MHz
Video Card: NVIDIA GeForce GTX 460
Video Mode: 1280 x 1024 x 4294967296 colors
Video Card Driver: nv4_disp.dll
Driver Version: 6.14.13.0623
Built-in memory: 3289 MB
Free memory: 257 MB
Memory available to Photoshop: 1677 MB
Memory used by Photoshop: 69 %
Image cache levels: 4
Serial number: xxxxxxxxxxxxxxx
Application folder: C:\Program Files\Adobe\Adobe Photoshop CS4\
Temporary file path: C:\DOCUME~1\xxxxxx\LOCALS~1\Temp\
Photoshop scratch has async I/O enabled
Scratch volume(s):
F:\, 233.7G, 145.7G free
Primary Plug-ins folder: C:\Program Files\Adobe\Adobe Photoshop CS4\Plug-ins\
Additional Plug-ins folder: not set
Installed components:
ACE.dll ACE 2008/08/27-18:10:41
AdobeLinguistic.dll Adobe Linguisitc Library 4.0.0
AdobeLM.dll AdobeLM 3.0.11.10077 53.352460
AdobeLM_libFNP.dll FLEXnet Publisher (32 bit) 11.5.0.1 build 57427
AdobeOwl.dll Adobe Owl
AdobeOwlCanvas.dll Adobe Owl Canvas
AdobePDFL.dll PDFL 2008/08/20-20:15:08
AdobeUpdater.dll Adobe Updater Library
AdobeXMP.dll Adobe XMP Core
AdobeXMPFiles.dll Adobe XMP Files 4.2.2 53.352624
AdobeXMPScript.dll Adobe XMP Script 4.2.2 53.352624
adobe_caps.dll Adobe CAPS 2,0,99,0 2.135373
adobe_epic.dll Adobe EPIC 3.0.1.10077 53.352460
adobe_eula.dll Adobe EPIC EULA 3.0.1.10077
AFlamingo.dll AFlamingo
AGM.dll AGM
ahclient.dll AdobeHelp Dynamic Link Library 1, 3, 12, 0
aif_core.dll AIF 1.0
aif_ogl.dll AIF 1.0
amtlib.dll AMTLib 2.0.1.10077 53.352460
amtservices.dll AMTServices 2.0.1.10077 53.352460
ARE.dll ARE 2008/08/27-18:10:41
asneu.dll AsnEndUser Dynamic Link Library 1, 6, 0, 8
authplay.dll
AXE8SharedExpat.dll AXE8SharedExpat
AXEDOMCore.dll AXEDOMCore
Bib.dll BIB
BIBUtils.dll BIBUtils
cg.dll NVIDIA Cg Runtime 2.0.0015
cgGL.dll NVIDIA Cg Runtime 2.0.0015
CoolType.dll CoolType 2008/08/27-18:10:41
data_flow.dll AIF 1.0 53.352475
ExtendScript.dll ExtendScript
FileInfo.dll Adobe XMP FileInfo 4.2.2
FNP_Act_Installer.dll FLEXnet Publisher (32 bit)
icucnv36.dll
icudt36.dll
image_flow.dll AIF 1.0 53.352475
image_runtime.dll AIF 1.0 53.352475
JP2KLib.dll JP2KLib 2008/06/11-20:19:53 53.100857 53.100857
libifcoremd.dll Intel(r) Visual Fortran Compiler 10.0 (Update A)
libmmd.dll Intel(r) C Compiler, Intel(r) C++ Compiler, Intel(r) Fortran Compiler 10.0
MPS.dll MPS 2008/07/07-10:33:04 53.350311 53.350311
msvcp71.dll Microsoft® Visual Studio .NET 7.10.3077.0
msvcr71.dll Microsoft® Visual Studio .NET 7.10.3052.4
pdfsettings.dll Adobe PDFSettings 1.04
Photoshop.dll Adobe Photoshop CS4 CS4
Plugin.dll Adobe Photoshop CS4 CS4
PlugPlug.dll Adobe(R) CSXS PlugPlug Standard Dll (32 bit) 1.0.0.73
PSArt.dll Adobe Photoshop CS4 CS4
PSViews.dll Adobe Photoshop CS4 CS4
registration.dll Registration
SCCore.dll ScCore
shfolder.dll Microsoft(R) Windows (R) 2000 Operating System
WRServices.dll WRServices
Installed plug-ins:
3D Studio 11.0
ADM 3.11x01
Accented Edges 11.0
Angled Strokes 11.0
Average 11.0
BMP 11.0
Bas Relief 11.0
Camera Raw 5.0
Chalk & Charcoal 11.0
Charcoal 11.0
Chrome 11.0
Cineon 11.0
Clouds 11.0
Collada 11.0
Color Halftone 11.0
Colored Pencil 11.0
CompuServe GIF 11.0
Conté Crayon 11.0
Craquelure 11.0
Crop and Straighten Photos 11.0
Crop and Straighten Photos Filter 11.0
Crosshatch 11.0
Crystallize 11.0
Cutout 11.0
Dark Strokes 11.0
De-Interlace 11.0
Dicom 11.0
Difference Clouds 11.0
Diffuse Glow 11.0
Displace 11.0
Dry Brush 11.0
Embed Watermark 3.0
Entropy 11.0
Extrude 11.0
FXG 11.0
FastCore Routines 11.0
Fibers 11.0
Film Grain 11.0
Filmstrip 11.0
Filter Gallery 11.0
Fresco 11.0
Glass 11.0
Glowing Edges 11.0
Google Earth 4 11.0
Grain 11.0
Graphic Pen 11.0
HDRMergeUI 11.0
Halftone Pattern 11.0
IFF Format 11.0
Ink Outlines 11.0
Kurtosis 11.0
Lens Blur 11.0
Lens Correction 11.0
Lens Flare 11.0
Lighting Effects 11.0
Liquify 11.0
MMXCore Routines 11.0
Matlab Operation 11.0
Maximum 11.0
Mean 11.0
Measurement Core 11.0
Median 11.0
Mezzotint 11.0
Minimum 11.0
Mosaic Tiles 11.0
Multiprocessor Support 11.0
NTSC Colors 11.0
Neon Glow 11.0
Note Paper 11.0
Ocean Ripple 11.0
OpenEXR 11.0
PCX 11.0
PNG 11.0
Paint Daubs 11.0
Palette Knife 11.0
Patchwork 11.0
Paths to Illustrator 11.0
Photocopy 11.0
Photoshop 3D Engine 11.0
Picture Package Filter 11.0
Pinch 11.0
Pixar 11.0
Plaster 11.0
Plastic Wrap 11.0
Pointillize 11.0
Polar Coordinates 11.0
Portable Bit Map 11.0
Poster Edges 11.0
Radial Blur 11.0
Radiance 11.0
Range 11.0
Read Watermark 3.0
Reticulation 11.0
Ripple 11.0
Rough Pastels 11.0
Save for Web & Devices 11.0
ScriptingSupport 11.0
Send Video Preview to Device 11.0
Shear 11.0
Skewness 11.0
Smart Blur 11.0
Smudge Stick 11.0
Solarize 11.0
Spatter 11.0
Spherize 11.0
Sponge 11.0
Sprayed Strokes 11.0
Stained Glass 11.0
Stamp 11.0
Standard Deviation 11.0
Sumi-e 11.0
Summation 11.0
Targa 11.0
Texturizer 11.0
Tiles 11.0
Torn Edges 11.0
Twain Acquire 11.0
Twain Select 11.0
Twirl 11.0
U3D 11.0
Underpainting 11.0
Vanishing Point 11.0
Variance 11.0
Variations 11.0 (11.0x001)
Video Preview 11.0
WIA Support 11.0
Water Paper 11.0
Watercolor 11.0
Wave 11.0
Wavefront|OBJ 11.0
Wind 11.0
Wireless Bitmap 11.0
ZigZag 11.0
Plug-ins that failed to load: NONE
Flash:
Connections
Kuler
Installed TWAIN devices:
WIA-hp officejet 6100 series
hp officejet 6100 series TWAIN -
Where does FireFox get the default value of a preference from. What is the format of the file that has the default value?. I need the actual default value for a particualr preference.
About:config does show some default values but I need the source from which about:config picks up the default value.
Any help in this direction is greatly appreciated.
== User Agent ==
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)The prefs that aren't hidden if they are the default are stored in two JavaScript text files in the Firefox program folder
You can open them via these links in a Firefox tab:
<code>resource:///defaults/pref/firefox.js
resource:///greprefs/all.js
</code>
([/forum/1/702598]) -
when round tripping with photoshop cc, i get a saved psd file with my original raw,the problem is these are high file sizes and taking a lot of space,can i stop this?
That's not the workflow that I use. I have my Lightroom preferences set to create TIF images when going to Photoshop. I keep the original raw file and the TIF image (usually reduced to an 8-bit image) and only export JPEG's when they are needed to send to a lab or to send to someone over the Internet. JPEG files are highly compressed. I only create them when they are needed, and they are discarded as soon as they have been used for their intended purpose. I keep the raw file and the Photoshop-created TIF in my library. This requires extra disk space. But I always have the highest quality files available.
-
I just started getting the error message below, when I drag a file to TRASH, I get the message "Finder wants to make changes. Type in your password to allow this." Why ? and how to to stop this request ?
There should be nothing native to the OS X which would ask for a password
or other information on a restart, unless accompanied by the traditional login
box with your user name.
There are adware or marginal products that could be called malware (bad)
that would impose their presence and some items that could have been
downloaded by accident or through some corrupted free software site; of
those some could ask for and gain permission to go through your Mac
and maybe even run in the background to do other nefarious misdeeds.
You could see if startup in SafeBoot allows you access past that the Completer.
Since I don't have a pile of helpful article links on how to resolve various issues
I'd be looking them up one way or another.
There are some helpful items in the site http://thesafemac.com - see Tech Guides
listed (adware, malware, & performance) plus a link to the adwaremedic page.
Also, Apple support has a helpful page on how to remove adware and other bits:
•Remove unwanted adware that displays pop-up ads and graphics on your Mac - Apple Support
Hopefully this helps somewhat.
Good luck & happy computing! -
How to get the RGB value of each pixel of a hole image?
Hi,
I'm trying the get the RGB(between 0 and 255) value of each pixel of a hole image. I writte this code:
public void convertImage()
int w = bufferedImage.getWidth();
int h = bufferedImage.getHeight();
int[] rgbs = new int[w*h];/* create a new array */
bufferedImage.getRGB(0,0,w,h,rgbs,0,w);
for(int i=0; i<10; i++)
System.out.println(rgbs);
But the value rgbs[] contain an 8 bits integer, it's possible to have the RGB of this.
In other case, do you have another sample of code to help me to get the RGB value of each pixel of a hole image?
thanks.Hi, I am currently working on an application which requires the generation of color histograms that are a representation of a given image ie; myImage.jpg. I have made use of the JAI API and used it's Histogram class to generate a histogram vector for the image that I provide.
However, upon closer inpsection, I have realised the following:-
(1) The image, as it contains multiple colours is a multi-banded image ie; this means that each individual pixel in the image contains multiple colour samples (I assume) ie; Red, Blue Green. Due to this, a "separate list of bins represents each individual band". This means that for myImage.jpg, there is not ONE individual vector that contains data such as "400 pixels purple" "5000 pixels yellow" etc but there are indeed 3 vectors that represent the image.
I have found this to be true using the getBinSize(int band, int bin) method call - the first parameter being 0,1,2 for Red Blue or Green.
My basic (or complex) problem is that I basically want to generate 2 color histogram vectors that represent 2 separate images and then compare these vectors "side-by-side" using the vector comparison algorithms that I have already developed.
Is there a way of using Java's Histogram class and it's associated methods to be able to store all colour information for an image in only ONE vector?? I am pretty certain that this is not possible, so my dilemma is now: - If I have an image and it is represented by three separate vectors/histograms, then how can I possibly compare these to say whether an image matches or not.
When a pixel is analysed by a program, what seems to be the result returned is how that pixel is made up in terms of Red, Green or blue ie; a purple pixel is X blue, X red and X green and hence 3 vectos existing.
Can anybody offer advice on how to achieve this task of looking at a pixel and simply determining it's actual color. I would preferably like to keep my code that I have already developed ie; the use of the Java Histoogram class but any other offerings are appreciated. -
How to get the actual value rather than pixel value in vision assistant
how to get the actual value rather than pixel value by vision assistant in my program.As shown in the figure this is my programme this is the result But i want to get this result
Check the documentation for the "ADF Dialog Framework"
It may help
Atilio -
Formatted Search: How 2 get the active value
Hi ,
I defined a simple FS to learn, but keep getting the same values for different codes.
Shortly, I have 2 tables, first one (
REASON) keeps ReasonID,Reason Description, etc.
In the second one (MAIN) I enter other unrelated data and ReasonID.
I wanna get Reason Description from REASON table into that MAIN table by the help of FS. So I defined something like that:
SELECT T0.U_ReaDesc from .[@REASON] T0 , .[@MAIN] T1 WHERE T0.U_ReasonID = T1.U_ReasonID</b>
When I use this query, I keep getting the same reason description for different reason codes, actually the description of the first data in the REASON table.
Ouery settings : Search By Saved Query - Auto Refresh - When exiting altered column - Column "REASONID "- Refresh regularly
I guess, I have to add or change something in the query, so that I can refer to the <u>activ ReasonID value</u> in the MAIN table and get the descr. for it.
(Sorry if this subject is handled before but I couldn't find anything related in SDN.)
GüHi Gul,
Why don´t you download the help files from the SBO marketplace?
You can find a document about the FS under Service & Support SAP Business One Knowledge & Services Knowledge Base Customizing Formatted Searches.
There it explains lot of things about them.
The FieldId is the variable number seen when you are in debug mode. ColID is used only for matrix columns. And you could use 0 for the format is no formating is needed.
Regards,
Ibai Peñ -
How to get the Output File Name as One of the Field Value From Payload
Hi All,
I want to get the Output file name as one of the Field value from payload.
Example:
Source XML
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_TEST xmlns:ns0="http://sample.com">
- <Header>
<NAME>Bopanna</NAME>
</Header>
</ns0:MT_TEST>
I want to get the Output file name as " Bopanna.xml"
Please suggest me on this.
Regards
BopannaHi,
There are couple of links already available for this. Just for info see the below details,
The Output file name could be used from the field value of payload. For this you need to use the UDF DynamicFile name with below code,
// Description: Function to create dynamic Filename
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
conf.put(key,a);
return "";
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
conf.put(key,a);
return "";
With this udf map it with the MessageType as
(File Name field from Payload) > DynamicFileConfiguration>MTReceiver
Thanks
Swarup
Maybe you are looking for
-
Itunes is grayed out using sync
When I attempt to Sync my device with iTunes, the screen within iTunes is grayed out. I cannot select any items from the iPhone. Please help.
-
How to save captured data to a log file to prevent lag?
Here is my VI. I read in an string of this format (the channels number are now 32 only but will like to increase up to more than 10000 later) Time\sStamp\tChannel:00\tChannel:01\tChannel:02\tChannel:03\tChannel:04\tChannel:05\tChannel:06\tChannel:0
-
When I try to use my midi controller keyboard for step input, it won't work unless I input the first note in each track via the Step Input Keyboard.. What am I doing wrong? Logic Studio 9.1.7, OS X 10.7.5
-
Crystal Print Control got Error
Hi, i used to take print from viewer, at the time Export and Print window came, after i searched, Crystal Report Viewer properties set Print mode to 'ActiveX'. working fine in Locally. Once deployed in server got error message like. Crystal Pri
-
My iphone just has something come and stating my passcode is expired. Why did this happen/. I just bought my son an IPAD3 today but he has created his own Apple ID and password but he doesn't have an Apple Iphone.