Histogram giving too many pixels

I am using photoshop to design rugs and i have to get an accurate percentage for each colour used in the design so that the rug makers can dye  the correct amounts of wool.
I am simply converting the image to indexed colour and making sure that if it is a three colour rug there are only three indexed colours in the design.
then i am selecting colours using the magic wand and working working out from the histogram what percentage of the image this colour is by dividing the number of pixels selected ,by the noncontiguous non anti aliased magic wand, by the total pixels in the image.
most of the time this is working fine, but sometimes one area of colour will clearly be read as having far too many pixels, sometimes even more pixels than are read in the image as a whole.
I don't understand why this is happening, there are no layers in the image, surely this should be really straightforward?
please help!

If you want to give a Script a try, paste the following text into a new file in ExtendScript Toolkit (part of Photoshop’s installation, Applications/Utilities/Adobe Utilities/ExtendScript Toolkit CS4 or /Applications/Utilities/Adobe Utilities-CS5/ExtendScript Toolkit CS5) and save it as a jsx-file into Photoshop’s Presets/Scripts-folder.
After restarting Photoshop the Script should be available under File > Scripts and can be assigned a Keyboard Shortcut directly, recorded into an Action, (in CS4 and CS5) be used in a Configurator-Panel or started from ExtendScript Toolkit directly.
Edit: Quickmask might be a better way to avoid crowding the History, so I’m changing the code.
// alert of percentage of selected pixels relative to whole image, but only if selection is strictly black/white;
// 2011, use it at your own risk;
#target photoshop
if (app.documents.length > 0) {
var myDocument = app.activeDocument;
// from function hasSelection(doc) by xbytor;
var res = false;
var as = myDocument.activeHistoryState;
myDocument.selection.deselect();
if (as != myDocument.activeHistoryState) {
res = true;
myDocument.activeHistoryState = as;
if (res == true) {
// set to pixels;
var originalRulerUnits = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
// get  quickmask’s histogram for 0 and 255;
myDocument.quickMaskMode = true;
var theChannel = myDocument.channels[myDocument.channels.length - 1];
var white = theChannel.histogram[255];
var black = theChannel.histogram[0];
var total = myDocument.width * myDocument.height;
myDocument.activeHistoryState = myDocument.historyStates[myDocument.historyStates.length - 2];
if (white + black == total) {
alert ((white/total*100)+" percent\nselected pixels: "+white+" \nunselected pixels: "+black)
else {
alert ("the selections seems to be anti-aliased")
// reset;
app.preferences.rulerUnits = originalRulerUnits;

Similar Messages

  • Outline stroke giving too many unnecessary points.

    how will I'm going to deal with this? when I converting into this, it give too many points even it looks like it can can just a 2 to 4 points. Any plugin that I may use while still maintaining its shape? and btw i'm on PC not Mac. Simplify and Cleanup didn't work.

    Expanding paths will very often still result in a tremendous point count. I have been trying to figure out the reason for it but this is not very easy.
    Here is a screenshot after expanding an envelope containing elements that are basically just circles and merged circles. The result is absolutely unusable. Can't work with it. Simplifying the path gives a little relief but frankly, it's a far cry from the old days.
    I have been using Illustrator since version 3. No, not CS3, version 3. That's right, the late nineties...
    Now frankly, the expanded result on the right is something Adobe really should pay attention to. This does not only happen with envelopes, mind you.

  • Too many pixels distance between iview and Desktop Innerpage

    Hi,
    how can I configure the distance in pixels between iviews on a page and the desktop innerpage? In my case, the distance is around 20 pixels from iView tray to TLN. Anyone?
    Bye
    Christoph

    Yikes! Sounds like your computer is having a difficult time rendering the icons. Fortunately there are steps you can take.
    If it were me, I'd boot into Single User Mode (power off, power on, then hold Command + S till you see white on black text).
    I'm making a couple of assumptions here. The first is that you want to delete all these RAR files for good. The second is that these files are all named similarly, something like rar1, rar2, rar3, etc.
    Then type the following:
    /sbin/mount -uw /
    cd /Users/yourusername/Desktop
    rm -rf rarname* (NOTE: here, this is assuming all the files start with something similar, like 'rarname', and then have a number on the end. By using the wildcard (*), we don't have to type each filename, as 'rarname*' applies to every file on the Desktop that starts with 'rarname'. Hopefully that makes sense! Just replace 'rarname' with whatever the files start with. If you aren't sure, before this command, type 'ls' and you'll get a list of all the files on the Desktop.)
    This should permanently delete all the files on the desktop. You can then type 'reboot' and the computer will start up normally. Good luck! If anything is unclear, feel free to let me know before attempting this.

  • I use only two channels, have plenty of memory in my hard disk, and external hard drive, no effects, and still having problems with Garage band. Giving messages as you have too many live channels

    I'm frustrated, I am doing everything you recommend, I use only two channels, have plenty of memory in my hard disk, and external hard drive, no effects, and still having problems with Garage band. Giving messages as you ave too many live channels, the disk is slow prepare...can you help?

    Quote from: Richard on 15-November-07, 20:33:05
    tornado2003,
    What you need to do is boot into Safe Mode. Then delete the VGA Drivers.
    After that boot normally and install the latest nVidia ForceWare Drivers
    Take Care,
    Richard
    i guess you missed that:
    Quote from: tornado2003 on 15-November-07, 17:26:52
    ive tryed booting xp in safe mode but it just freezes after it loads up a couple of needed files .
    ive even formatted my hard drive and tryed installing a fresh xp on it but it just keeps locking up when it gets to the "starting windows setup" .(this is just after it loads all the drivers from the xp cd)

  • TS3682 I have tried to restore me iPod that is disabled due to typing in the wrong password too many times. iTunes keeps giving me a box saying that it can't connect because I need to type in the passcode on the iPod (which I can't) what do I do now?

    I have followed the steps provided by apple to restore an iPod touch. It is disabled due to having the wrong password entered too many times. When I get part way through the restore process on my computer it pops up a box saying that it can't restore until I enter the passcode into the iPod. I have tried this same process over 5 times now and keep gutting the same results. It is my kids iPod and he has only had it since September. Someone please help me before I throw the thing through the window and my kid strangles me!!! Thanks!

    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen        
    If recovery mode does not work try DFU mode.
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings

  • An embarrassment of riches - too many tablets! Should I consolidate and get an iPad Air?

    Currently I have the following tablets:
    - Nexus 7 2013 wifi only
    - iPad 2 32 GB wifi + cellular, but no longer in contract
    - iPad 1 wifi + cellular, no longer in contract
    - an extra iPad 1, also wifi + cellular, not in contract that I got for free for helping somebody with some computer stuff
    That same friend who gave me the iPad 1, wants to upgrade from his iPad 4th generation to an iPad Air, and he want to give me his 4th G iPad for free. It is a 64 GB wifi only model.
    The reason I never upgraded beyond the iPad 2 was because all the later models got thicker and heavier, and I thought my iPad 2 was already too heavy, which is why I got my Nexus 7. I hardly touch my iPad 2 these days. They are both within arm's reach, but the Nexus 7 is easier to hold, and allows voice input, which I often find convenient, and most of the time I reach for it. I like the voice input on my iPhone 5 too, and I feel like something is "missing" when I pick up my iPad 2. Plus it feels like it weighs a ton next to the Nexus 7.
    Well, anyway I have too many tablets. And soon I'll have the iPad 4th G. So I was thinking of selling the iPad 2, the two iPad 1s and the iPad 4 and getting an iPad Air, wifi + cellular with a data sharing plan with my iPhone 5. After all, compared to the iPad 2, the iPad Air is (1) lighter, (2) has Siri, (3) has a retina display, (4) has much better specs and (5) now the cellular model is universal, so if I take a trip to the U.S. it would be easier to use there.
    Yet there are things I now prefer about my Nexus 7 with Android 4.4 over iOS 7. Like it has better sharing features, the ability to send all kinds of attachments, more customization, better "hooks" into the UI from 3rd party apps, the ability to choose your own default mail apps and browsers. It seems just more flexible overall. And the Facebook app runs "smoother" than on my iPad 2.
    But I like iOS 7 too.
    I wonder if I would use an iPad Air any more than I do my iPad 2 since it is lighter than the recent iPads. The screen being larger might make reading magazines and news sites easier. And Siri is still better than the Android voice dictation in my opinion. Or will the weight and size actually keep driving me back to the Nexus 7?
    I guess I still haven't found the right place in my life for using a tablet for anything other than casual use. I don't want to get into a religious argument about whether tablets are production devices versus consumption devices, but basically I am in the camp that does not see them as true productivity devices. My iMac is for that.
    Conundrums, conundrums. I do have too many "devices" right now though. Within an arm's reach I can count 12 computers, tablets and phones all on wifi! Who needs that much stuff?!
    And if I do get the iPad Air, do I need 128 GB? The way they sell here in Japan, you don't put any cash down at all, and basically get an interest-free loan for 2 years. So "for just a few hundred yen more a month" you can go from the 32 GB model to the 64 GB model. And then "for just a few hundred yen more a month" you can go to the 128 GB model. It seems a waste not to get the 128 GB model. But in my current iPad 2 I only use a little more than half the current 32 GB.
    Decisions, decisions. Any thoughts?
    doug

    The weight is somewhat of an issue for me. I find the iPad 2 irritatingly heavy whenever I pick it up, and the iPad 4th generation is heavier even than my iPad 2.
    But for the amount I use it I could get used to that. That option is certainly the least headache, contract-wise, and I would avoid the ever-present possibility of dealing with AppleCare if something is "not perfect" (which it never is).
    I guess the only "practical" reason would be that I would be getting rid of all my iPads with a cellular option. So if I did make a trip to the U.S. in the spring, it would be harder to use the iPad 4. Here, in Japan, of course I could use the free tethering option on my iPhone 5.
    So I guess it is just the cellular option I'm giving up that is in the back of my mind.
    doug

  • Is it possible to have too many keyframes in one project in Premiere?

    Hi all,
    I'm using Premiere 6 on a Windows 7 ULT machine.
    Is it possible to have too many keyframes in one project in Premiere?
    I'm getting app crashes when I try to re-open a certain project in Premiere 6 and it seems that if that file has over 93 keyframes, then it will not re-open.  But I can re-open that exact same project file with 93 keyframes in it, no problem.
    But if I go any further and create any more keyframes than 93 in a new re-saved version of the exact same file, then that file will not re-open and I get an app crash... you can see screenshots of the two Windows app crash info panels below that I'm getting from three different bad Premiere project files that I've created so far.
    I've tested and tested what is going on here and this seems to be what is causing the bad files.  I've re-created the scenario and re-created files with over 93 keyframes from the same base project file that will still open... as soon as I get more than 93 keyframes in this file, then that newly saved file will not re-open after I close and try to re-open it.
    This is 75 keyframes in one still image clip, 14 keyframes in another still image clip and 2 keyframes each in two other still image clips in a single project file... that is the limit... if I create any more keyframes in the clip that has 75 keyframes, the new file will save and render, but it won't re-open once it has been closed.
    The two slightly different app crash info panels show, in the first one below,
    "Fault Module Name: StackHash_e98d"
    ... and the second one shows,
    "Fault Module Name: PREMINFO.dll"
    ... both messages with a little more different info in each one.  I get either of the two error info panels when trying to re-open all three bad files that I've created with over 93 keyframes in them.  That is, two of the files alternate between giveing "StackHash_e98d" and "PREMINFO.dll" when trying to open them and one of them always shows the "Fault Module Name: PREMINFO.dll" error.
    So even the error messages are inconsistent with two of the bad files.
    I've searched the internet for this error in association with Premiere and I've also searched on this forum and found nothing.  Can anyone shed any light on this?
    Thanks,
    digi

    Bill,
    Even though I figured out a work around, I was still interested to know if these file opening crashes are related to Virtual Memory.
    So on the topic of Virtual Memory... a few months ago I was troubleshooting a different problem in Premeire and I found this information...
    "To improve performance in Premiere Pro, adjust the size of the paging file to a maximum of twice the amount of installed RAM."
    Previous to that time three months ago or so, I had my Virtual Memory settings at the default automatic setting, but I tried setting my VM to twice the amount of installed RAM, and I've had it set that way ever since, just to make sure I'm optimizing the VM performance for Premiere and other apps.
    But that isn't making any difference in this case.  Today I also found information in a search that says to troubleshoot StackHash crashes, one should turn off "DEP" in the system settings for the application with the crash problem... according to the paragraph below, from the second post down by Chris on this tdistler.com page... http://tdistler.com/2009/04/10/stackhash-and-application-crashes-on-windows
    Even though this was written in 2009 with Windows Vista in mind, many things for Vista work in Windows 7... it says,
    "Here’s how 99 percent of Vista users can fix a StackHash failure. I’ll walk you through it step by step:
    Method A:
    1. Open your Start menu and click Control Panel
    2. Browse to “System Maintenance” then “System”
    3. In the left panel, select “Advanced System Settings” from the available links
    4. You should now see the System Properties Window, which will have three sections. The top section is labeled “Performance” and has a “Settings” button. Click this button.
    5. Select the “Data Execution Prevention” tab.
    6. Select the option which reads “Turn on DEP for all programs and services except those I select”
    7. Use the “Browse” button to locate the executable file for the application you were trying to start when you received the StackHash error, and click Open to add it to your exceptions list.
    8. Click Apply or OK to commit your changes."
    But I tried this and none of the three problem files that I encountered would open... I still got the StackHash_e98d or PREMINFO.dll crash errors.
    So anyway, I'm a ways past that in my project now, just continuing with more keyframes over the number of 78 in separate but identical still image clips... that allows me to successfully work with this project with as many keyframes as I need.
    Thanks again,
    digi

  • While importing clip getting error "The file contains too many audio channels" in premiere pro cs5

    Hey,
    I  am using video clips from sony digital hi8 camera and trying to import  video clips (.mov) 720*480  fps 29.97 .But unable to get into premiere  pro cs5.System configuration:
    MAC 10.6.4
    2.66ghz intel core i7
    4gb ram
    nvidia geforce gt 330 mn.
    Error :
    Actually ,i have checked the inspector panel and i found same infomation in
    in this panel for both clips .please check these clips screen shoots seprately .
    Actually i have a long video clip and i have scatterred this clip into 6 diffrent portions
    where i am not able to import the last video clip.It is giving me same error "file contain too many audio channels"".
    Regards
    Manoj

    I too am getting this error in Premiere CS5.  I was digitizing a Broadcast VHS and since I did not have a breakout box, I hooked it up to a Sony DV deck so I could connect via firewire and capture inside Premiere.  I was able to capture and import 1 of the 3 clips and it did have 4 audio channels attached to it.  However, upon closer inspection only 2 channels had a waveform.  I captured the other 2 clips the same way, but this time, Premiere give the error "The file contains too many audio channels." 
    Any ideas?

  • Mod_plsql: /pls/apex/wwv_flow.accept HTTP-400 Too many arguments passed in.

    Hi All ,
    I want one solution i have a report which fectches the ppt that r stored in db,If i search more results it errors out so i have reduced the results and it was working fine.Now i see it is giving the same error(as below) althorugh it was working fine by reducing results in query.Can anybody please help me in this.
    the error is
    Bad Request
    Your browser sent a request that this server could not understand.
    mod_plsql: /pls/apex/wwv_flow.accept HTTP-400 Too many arguments passed in. Got 3250 parameters. Upper limit is 2000
    Oracle-Application-Server-10g/10.1.3.1.0 Oracle-HTTP-Server Server at insightapps.oraclecorp.com Port 80

    Section 1.10 of the Oracle HTTP Server mod_plsql User's Guide states the following
    The total number of name value pairs that can be passed to a PL/SQL procedure is 2000.
    mod_plsql limits the total number of parameters that can be passed to a single procedure to 2000.
    mod_plsql limits the size of a single parameter that can be passed to a procedure to 32000 bytes.
    It would be helpful to know how each of these apply in the APEX context
    Varad

  • After Loading Lion I now get 5 windows w/ a graphic of a Red Stop sign with an ! mark and the following text message: "DAVE Networking  Dave kernel extensions could not be loaded! Error 71 - Too many levels of remote in path."

    After Loading Lion I now get 5 windows w/ a graphic of a Red Stop sign with an ! mark and the following text message:
    "DAVE Networking 
    Dave kernel extensions could not be loaded! Error
    71 - Too many levels of remote in path."
    I have uninstalled DAVE and used Clean App to remove trace elements of program, however I still get the message and am unable to eliminate the error messages.  When I click OK the message goes away briefly and then comes back up.
    Any solutions would be great.

    Dave,
    Thanks....What I did was load the free eval version of Dave 9.0 and then used the uninstaller which must have deleted the kernel giving me the problem. 
    Thanks for the response.
    Razor

  • JBO-25013: Too many objects match the primary key oracle.jbo.Key[0 ].

    Hi All,
    I saw all the threads pertaining to this problem but couldn't find a proper solution.
    I m also facing the same problem. I have 2 view objects VIEW_A and VIEW_B. Both the view objects are created on the single entity objects independently. When I try to insert a row in VIEW_A, no error comes and all the input fields of the form are empty as it should be. But when I try to insert a row in VIEW_B, the form fields display the first row of database table automatically and giving the error as Error
    JBO-25013: Too many objects match the primary key oracle.jbo.Key[0 ]. ..
    I am unable to rectify the problem. why it works fine with one view object and not with other. Plz help. Its urgent...

    Hi,
    Many references in metalink relate to this error as a data corruption issue. Maybe you should check the data from the back end,from the corresponding tables , with the one you see in the application . I'm no expert in DB,but suggest you take the help of a DBA.

  • Safari wont open gmail. too many redirects. HELP!

    Suddenly I am having a problem accessing my gmail account via Safari on my iPad.
    It keeps giving me the eroor message "Too many redirects".
    Any suggestions on how to correct this without restroing the whole iPad?
    Thanks

    I much prefer using IMAP and going through the mail app. Maybe try that out

  • Too many recipients found for message type ORDERS in the ALE model

    Hi all ,
    please help me to solve this issue .
    i done with ale settings .
    orders message type is used in 2 different model view for 2 different systems
    when i create po it is giving error in output  "Too many recipients found for message type ORDERS in the ALE model"
    how can i rectify this error.
    Thanks

    > orders message type is used in 2 different model view for 2 different systems
    do both of them carter diffrent needs or is it the same idoc which is being sent to diffrent systems?
    if yes, then use a single model view with noth receiver systems defined in it.
    if not, i would suggest, copying the standard idoc and create a zidoc and then use different ones for diffrent receivers....
    or u can use diff versions of the orders message type...
    say orders05 for one.... receiver and orders02 for another one....
    hope this helps!!
    Cheers!!
    Sidharth

  • ALE settings error   "Too many recipients found for message type" urgent

    Hi all ,
    please help me to solve this issue !!!!!!!!
    i done with ale settings .
    in the bd64 , orders message type is used in 2 different model view for 2 different systems
    when i create po it is giving error in output "Too many recipients found for message type ORDERS in the ALE model"
    how can i rectify this error.
    Thanks

    Hi,
    Try to redefine your distribution model to have both receivers of your message type ORDERS in one "model view".
    Regards,
    Jakub

  • ALE error  "Too many recipients "

    Hi all ,
    please help me to solve this issue !!!!!!!!
    i done with ale settings .
    in the bd64 , orders message type is used in 2 different model view for 2 different systems
    when i create po it is giving error in output "Too many recipients found for message type ORDERS in the ALE model"
    how can i rectify this error.
    Thanks

    Hi,
    Please refer the link below:
    http://www.jt77.com/CRM/related-discussion-6255.html
    Thanks,
    Sriram Ponna.

Maybe you are looking for