GFilterRecord- inRowBytes always set to a multiple of 16 by photoshop

Hi,
I am trying to write a series of filter plugins that expect a region of memory that is exactly (filterRect.right - filterRect.left) bytes per row of image data.
As you can see I'm attempting to set inRowBytes here, as well as some other shot-in-the-dark fields of the FilterRecord to try and solve this.
I've noticed that after a call to advanceState(), inRowBytes/outRowBytes is ALWAYS the next highest multiple of 16 if my filterRect width is not a multiple of 16.  For instance, if filterRect represents a 1025x769 region, inRowBytes = outRowBytes = 1040.  The problem is my_function is assuming that inData is exactly (filterRect.right - filterRect.left) bytes per row, so everything gets all skewed and messed up.  I tried saying I don't want padding, tried setting wantsAbsolute/wantsLayout, etc, but nothing has worked and I'm not sure what to do here?  Should I adjust the filterRect by some mod 16 amount??  Or is there some other way I can ignore those bytes?
for(int plane=0; plane<3; plane++) {
        gFilterRecord->outLoPlane = gFilterRecord->inLoPlane = plane;
        gFilterRecord->outHiPlane = gFilterRecord->inHiPlane = plane;
        if (gFilterRecord->haveMask) {
            SetMaskRect(filterRect);
        gFilterRecord->wantsAbsolute = true;
        gFilterRecord->inputPadding = gFilterRecord->outputPadding = plugInDoesNotWantPadding;
        gFilterRecord->inRowBytes = gFilterRecord->outRowBytes = filterRect.right-filterRect.left;
        SetInRect(filterRect);
        SetOutRect(filterRect);
        // update the gFilterRecord with our latest request
        *gResult = gFilterRecord->advanceState();
        if (*gResult != noErr) return;
        my_function(gFilterRecord->inData,
                             gFilterRecord->outData,
                             filterRect);     

Ah ha.. part of my confusion was I didn't know what was in those extra bytes but after some inspection with
a debugger I've decided they are garbage values so basically when my filter algorithms need to reference memory they need to use
inRowBytes as the mulitplier when creating an 'index' to a row and not filterRect.right - filterRect.left.  Sometimes easy things confuse me.

Similar Messages

  • Safari is now opening with multiple windows. Not sure what changed in my settings. I prefer Safari to open with a single homepage, which I've always set to Yahoo. Any help?

    Safari is has begun opening with multiple windows. Not sure how this change happened. I prefer Safari to open with a single homepage, which I've always set to Yahoo. Any suggestions?

    Quit the application. Force quit if necessary.
    Relaunch it by holding down the shift key and clicking its icon in the Dock. From the menu bar, select
    Safari ▹ Preferences... ▹ General ▹ New windows open with: Homepage

  • Can we with ligthroom  have the sofware set up on multiples computer mac and mc and share the same dat base library?

    can we with ligthroom  have the sofware set up on multiples computer mac and mc and share the same dat base library?

    No, a Lightroom catalog cannot be on a networked drive, and can only be accessed by a single user at a time.

  • I have installed ios7 on my iPad 4. After installation it asked me pass code which I have never set. After multiple attempts it is disabled. I don't have backup on my iCloud or iTunes. Is there anyone who can help to enable it or to reverse iPad to ios6.

    I have installed ios7 on my iPad 4. After installation it asked me a pass code which I have never set. After multiple attempts it is disabled. I don't have backup on my iCloud or iTunes. Is there anyone who can help to enable it or to reverse iPad to ios6. I asked Apple store & tech said to format it but I will lose all the data..!

    Thanks for that. Much more constructive than the last comment. It's only the restriction code I can't recall, not the access passcode. So I can currently access the device, just not age restricted content. Does that's make a difference? I also wondered if anyone knew how many attempts you get to try to get it right. Now tried 21 times and so far nothing bad has happened but I am concerned I'll eventually be completely locked out of the device. That doesn't seem in the spirit of things though. Surely it's foreseeable that a child could repeatedly try to guess the code so I can't see that it would be right to lock the device down completely in that circumstance, particularly if the access code is being typed in correctly every time.
    Thanks

  • I need to back up my imac running Tiger (no time machine) so that we can upgrade OS. It is set up for multiple accounts.  How do I capture all files in each account using newly purchased USB external hard drive?

    I need to back up my imac running Tiger (no time machine) so that we can upgrade OS. It is set up for multiple accounts.  How do I capture all files in each account using newly purchased USB external hard drive?  Thanks!

    Backup Software Recommendations
    Carbon Copy Cloner
    Data Backup
    Deja Vu
    SuperDuper!
    Synk Pro
    Tri-Backup
    Others may be found at VersionTracker or MacUpdate.
    Visit The XLab FAQs and read the FAQ on backup and restore.  Also read How to Back Up and Restore Your Files.
    Or you can simply use the Restore option of Disk Utility to clone the drive to the backup:
    Clone using Restore Option of Disk Utility
    Open Disk Utility from the Utilities folder.
    Select the destination volume from the left side list.
    Click on the Restore tab in the DU main window.
    Check the box labeled Erase destination.
    Select the destination volume from the left side list and drag it to the Destination entry field.
    Select the source volume from the left side list and drag it to the Source entry field.
    Double-check you got it right, then click on the Restore button.
    Destination means the external backup drive. Source means the internal startup drive.

  • Is it a known but that the outgoing SMTP user ID is always set to the same as the incoming even when set differently?

    I'm trying to figure out where to report this: I keep noticing that when I setup a new account and I set the incoming and outgoing user names differently, the outgoing one never is honoured; it always sets it the same as the incoming one and I have to manually go into the outgoing settings to change it. Just wondered if this was known, thought it might be worth reporting.

    please file a bug in [https://bugzilla.mozilla.org/ Bugzilla].
    I can not see this one listed, but it looks to me like the behavior may well have been introduced with [https://bugzilla.mozilla.org/show_bug.cgi?id=883670 Bug 8396652]
    Please post a link here to the bug, so I can follow along.

  • Is that possible to set up a multiple y-axis and single x-axis in one waveformchart (in LabVIEW 8.0)?

    Hello!
    Is that possible to set up a multiple y-axis and single x-axis in one waveform chart using LabVIEW 8.0?
    Because I need to display several channels in the same chart, if one channel has a very big data range and the others not, the channels with smaller data range will not be displayed very clear.
    Thanks!

    See similar thread at http://forums.ni.com/ni/board/message?board.id=170&message.id=154428&requireLogin=False

  • Can FCS be set up in multiple offices - Would that be one database or can we synchronize several - I need general architecture concept

    Can FCS be set up in multiple offices/locations - Would that be one database or can we synchronize several databases - I need general architecture concept

    If you want to link to separated location which are too far from each other to connect via Ethernet or FC you can't. What you can do is build another FCS with a completely independent DB and link both with XML and scripting (or if you have a very good DB knowledge). Other than that you can put the FCS DB in one location and make the clients on the other connect to the first one. But if the issue is to ingest media from both locations to the same DB then you better have a nice and big Ethernet connection between both locations.
    Hope this help

  • Cs6 histogram why always set to colors?

    Hi
    about cs6 , why the histogram is always set to colors??
    i mean is a bug like cs5
    it should be set by default to rgb
    every photo i load it's always set to colors
    and i guess there is not option to save and have rgb by default
    thanks
    cheers

    Slowly I'm beginning to get the impression that "bug" is the word for "user error" or "user inexperience" in your language.   
    You're looking at colors in the histogram because that's what you have chosen in the dropdown:
    Here's what you see if you set the Channel dropdown to Colors:
    and here's what you see when you set it to Luminosity:
    As you can see, there are other choices, such as RGB and individual channel, six selections in all.
    Next time you feel like crying wolf—or bug—reach for the Help files in Photoshop instead.  You might also want to buy a good book to learn Photoshop, mantralight.  I'd recommend "Photoshop Clasroom in a Book".

  • In application builder the top level vi is always set to "run when opened"; how do I turn this off so I don't have to change it each and every time I build a .exe??

    I build a lot of executables using Application Builder under LabVIEW and in every one I build, I don't want the top level vi to take off and run when I open the executable. Currently, I edit each .exe I build within Application Builder and change the option of "run when opened" from Yes to No for the top level vi. All the other subvi's are already set to No. It would seem as though there should be some way to "turn this off" if you will so the top level vi is not always set to "run when opened" by default within Application Builder. Is there such a solution that anyone knows of?? Any help would be apprec
    iated... thanks...

    Indeed the Application builder forces "run when opened" to true for top levels VIs. If you don't want your VI to make any real work when the application starts, you should simply put a do-nothing loop in the beginning of the VI that will loop until the user presses a boolean. It will be more intuitive for users to press a Run button on the FP than clicking on the white Run arrow in the bar.
    LabVIEW, C'est LabVIEW

  • Burning a set of pictures multiple times onto CDs

    I'm trying to burn a set of pictures multiple times onto CDs with Lightroom. Using Export I can burn one set but if I'd like to burn another set I need to Export again and overwrite the existing files every time. Is there no way in Lightroom to burn another CD with the files that are already there?

    The transfer is meant to be one-way from iTunes to iPod. Are the songs on the playlist iTunes Store purchases or were they ripped from your personal collection. If iTunes purchases, you should be able to transfer those from the iPod. Read the following doc for specifics:
    http://docs.info.apple.com/article.html?artnum=93063
    If not iTunes purchases, your best bet is probably to connect the iPod to the first computer and enable disk use on the iPod. Then copy the song files to the iPod's hard drive space. When you connect to the second computer, drag the files from the iPod's hard drive to your computer. You will then have to authorize the computer to play them. (You're allowed up to five authorizations.)
    Post back if you need more help.

  • When I open Adobe Acrobat, the menu onthe left is always set to 'Layers'.  I have tried to change it to 'Pages' without any luck.  Can anyone suggest a fix?

    When I open Adobe Acrobat X, the menu on the left is always set to 'Layers'.  How can I change it to always be set to 'Pages'?

    Most of the time you see something like that. The image in question has a color profile other then sRGB. Some image viewers/displayers are color managed and others are not.  So the image do not look the same in all of the applications you use. So colors seem to change.
    Try converting it to sRGB color and see if then looks the same all around. Also I think PC and Mac displays are set to different gamma something like 1.8 and 2.2
    Though I'm colorblind I even see color variations.

  • DSCP (Differentiated Services Code Point) value always set to '0' for outgoing packet on win 7

    DSCP (Differentiated Services Code Point)
    value always set to ‘0’ for outgoing packet on win 7
    I have setup – Controller (Win 7) and Responder (Win XP)
    In controller I setup DSCP value to something – ‘50’ (in hex 0x32) and perform RTP call
    Then I sniff packets using ‘Wireshark’ where I found DSCP value from Controller to Responder not able to set but which is able to set in packet from Responder to Controller.
    Controller to Responder
    Responder to Controller
    When I run same application under same network, where Controller and Responder are having Win XP, then DSCP value appear in layer 3 protocol.
    When I googled then learned I need to do some registry changes mentioned in below links -
    http://technet.microsoft.com/en-us/library/cc758910(WS.10).aspx
    http://support.microsoft.com/kb/2733528/en-us
    But this solution did not help to resolve my problem.
    Later I did followed changed in Local Group Policy Editor but which was also fruitless.
    I do not want to set some fix DSCP value for all outgoing traffic, as my application has provision to take an input for DSCP value from user.
    http://technet.microsoft.com/en-us/library/cc771283.aspx

    Hi,
    I'll involved another engineer who had more knowledge with your problem. Thanks for your understanding.
    Roger Lu
    TechNet Community Support

  • ANSI_WARNINGS is always set on new connections, despite the defaults

    Hi, we need ANSI_WARNINGS off in order to truncate string columns.
    The problem is that the ANSI_WARNINGS is always set on new connections. I checked that it is disabled in sys.configurations "user options" (value is 0). I double checked in SSMS DB properties and server connection properties.
    Every time we create a new connection (even restarting SSMS and/or sql server) the ANSI_WARNING is ON again. We checked by running SELECT 8&@@OPTION and DBCC USEROPTIONS
    -- This works, but I can't do it on every connection!
    SET ANSI_WARNINGS OFF
    Sql Server info:
    Enterprise Edition 64-Bit
    Product Version 11.0.5058.0 SP2

    Hi, we need ANSI_WARNINGS off in order to truncate string columns.
    No, you don't. ANSI_WARNINGS OFF is a legacy setting and should not be used with new development. There are several features in SQL Server that does not work when this setting is off:
    * Queries to linked servers.
    * Indexed views.
    * Indexed computed columns.
    * Filtered indexes.
    * XML type methods and XQuery
    And there are probably more.
    As Tom says, take the bull by the horn and fix the code that causes truncation errors.
    The only way with a .NET client to turn off ANSI_WARNINGS is to submit the command SET ANSI_WARNINGS OFF every time you connect.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • On boot up, volume is always set to maximum

    When I boot the computer, the volume is always set to maximum. I normally run it about 50% but it will always be at max when I boot up.

    Try a PRAM reset: http://support.apple.com/kb/HT1379
    Also, see this related thread:
    http://discussions.apple.com/thread.jspa?threadID=1959528

Maybe you are looking for

  • Open file dialog in java apps causes segmentation fault

    Started to happen since sometime early in the java 1.5 releases (the early developer releases and still now) Programs like Eclipse (3.1.x) and Azureus (2.3.0.x), when I try and open a file using the toolbar or menu the application dumps. I am tried r

  • HOW do I get the "watch" to stay on and not shut off on my 6th GEN  NANO?

    After purchasing a $70 cool watchband for my new 6th GEN NANO, I'm very disapointed that I can't get the "watch" function to stay on more than 15 seconds.  AppleCare says that it isn't meant to stay on, it would run down the battery.  Then why put on

  • Adobe Acrobat Pro XI vs X Accessibility Checks

    I have a Adobe Acrobat Pro XI. My client has Adobe Acrobat Pro X. In XI, my documents are completely accessible, but when they run the accessibility check in X they show errors. The client will send documents back to us as non-compliant due to these

  • Cant get past the "lets get started" page!!!!!

    When I click on the "ipod" section in my itunes library, theres a page that says "Lets get started" and tells me to name my ipod and all that. the problem is that the right part of the page is cut off and i cant reach the options that i assume are th

  • Problems With MXML Editor

    I have noticed that if in your project you link to folders that are outside of the project but are within your workspace, when you open mxml files in those folders the editor does not color code and AS code within <fx:script> tags. It seems fine howe