rowBytes returns an incorrect value
Hello
I am about to create an exporter for a compression format.
I feel a strange situation where the value of ExportRecord-> rowBytes is giving a strange value that gives my code crash Photoshop.
I process the image line by line and initially to create a buffer of size gStuff-> imageSize.h * gStuff - > imageSize.v * gStuff-> aircraft
Now, I get the image data line-by-line, plan by plan, copy it into the buffer I created and move a pointer by rowBytes assuming its value would be the same as imageSize.h to copy the following line.
This caused buffer overruns. After debugging using a simple 1000 x 1000 rgb image, I saw that returned 1008 rowBytes.
For an image of 900 x 900 he returned 912.
Why is this? It should be 1000 and 900 in these cases, I said to get only get a single plane and a single line.
The doc says "rowBytes = the offset between the lines for the requested image data.", so these extra bytes whence? What value do have?
If rowBytes is not the width of the image useful what?
Thank you
DiMI
Scanlines are usually completed within limits of 16 bytes, so rowbytes reflecting.
Tags: Photoshop
Similar Questions
-
PDEElementGetBBox returns an incorrect value
Hello
I have developed a plugin that remove the object such as text, image, and path with respect to the coordinates of user input. In some cases, the value obtained by PDEElementGetBBox return the false value.
Code I used
If (PDEObjectGetType ((PDEObject) pdeElement) == kPDEPath)
{
PDEElementGetBBox (pdeElement, & bbox);
float PathTop = ASFixedToFloat (bbox.top);
float PathBottom = ASFixedToFloat (bbox.bottom);
float PathLeft = ASFixedToFloat (bbox.left);
float PathRight = ASFixedToFloat (bbox.right);
If (the Condition is true)
{
PDEContentRemoveElem (pdeContent, j);
}
}
Bbox return an incorrect value
Is all that I'm missing
Hmm. It seems that the method returns the BBox of the shape of XObject. This is the bounding box used to design the form elements, not the bounding box when she turned on the page scaling and offset. The documentation says that the BBox is returned in the 'user space '. I wonder, if you need to use PDElementGetMatrix and apply it to the BBox returned in this case - maybe anyway and you had the chance before - have you tried PDEImages?
-
PL/SQL in dynamic Action seems to return an incorrect value
Hi all
I am very new to the Apex and PL/SQL, so I don't know if I did something wrong here.
I have a form with a shuttle service (P4_ITEMS) and a field display only (P4_ORDER_TOTAL). I have a dynamic action put in place with the following PL/SQL:
declare tab apex_application_global.vc_arr2; total number := 0; itemPrice number; begin tab := apex_util.string_to_table (:P4_ITEMS); for i in 1..tab.count loop select PRICE into itemPrice from PRODUCTS where PRODUCT_ID = tab(i); total := total + itemPrice; end loop; return total; end;
If I understand correctly, tab must contain all the elements that are in the 'selected' part of the shuttle. I try to summarize the prices of selected items and return the set. Pretty simple, right?
Here is some info on the dynamic Action itself:
Event: Change; Selection type: Article (s); Article (s): P4_ITEMS (the shuttle)
The event (the PL/SQL function running) is also set to pull on the loading of the page. It is near the top not to expect results, so during the calculation, display field disappears briefly.
Here's the number: P4_ORDER_TOTAL updates only correctly when I first load the page. I enabled debugging but I changed my Shuttle, then checked out.
He recorded the P4_ORDER_TOTAL element. In this case, we will say it was 363.08. I added an item on the agenda and the PL/SQL is executed. The result, however, is 363.08, although he should have gone to the top. If I leave the page and then click its tab again, the order is always there, except that this time that it runs again the PL/SQL and it updates the P4_ORDER_TOTAL field to the correct value.
Can someone explain what is happening here? I can't understand why it isn't like I intend to work.
Feel free to ask me more questions if I'm not well explained.
Thanks in advance!
klanchman wrote:
I am very new to the Apex and PL/SQL, so I don't know if I did something wrong here.
Always include the following information in your question:
- Full version of APEX
- Complete version/edition/host operating system database
- Server Web architecture (EPG, SST or APEX listener/operating system host and versions)
- Browser (s) and version (s) used
For the layout and Visual set formatting issues. also include:
- Theme
- Type of zone
- Models used
Here is some info on the dynamic Action itself:
Event: Change; Selection type: Article (s); Article (s): P4_ITEMS (the shuttle)
The event (the PL/SQL function running) is also set to pull on the loading of the page. It is near the top not to expect results, so during the calculation, display field disappears briefly.
Here's the number: P4_ORDER_TOTAL updates only correctly when I first load the page. I enabled debugging but I changed my Shuttle, then checked out.
He recorded the P4_ORDER_TOTAL element. In this case, we will say it was 363.08. I added an item on the agenda and the PL/SQL is executed. The result, however, is 363.08, although he should have gone to the top. If I leave the page and then click its tab again, the order is always there, except that this time that it runs again the PL/SQL and it updates the P4_ORDER_TOTAL field to the correct value.
Can someone explain what is happening here? I can't understand why it isn't like I intend to work.
At the time the dynamic action is executed, the value of P4_ITEMS is not available for the PL/SQL code in session state, it takes place only in the browser. Include P4_ITEMS in elements of Page to submit property the dynamics of the action so that the changed value is updated in the State of session before the PL/SQL code is executed.
-
Static LOV returns an incorrect value in a table
I created a tabular form and when the form is created, I have to go in and edit the source of the region to include a decoding of one of the columns that I chose in the wizard. I use tables to create users for my application using a custom authentication scheme. I decode the password column to display either Set Password or reset the password. Therefore, it is necessary to change the code.
++ Code +++
Select user_name, created_on, expires_on, user_id, $admin_user,
decode (password, null, 'Set Password', 'Reset Password') PR
of app_users
where user_name! = "ADMIN".
++++++++++++++++++++++++++++++++++++++++++++++
I have a static LOV:
Yes; Y, no.; N
I use this to indicate whether the user is an administrator or not
I can fill data in the areas of text without a problem, but when I chose Yes for the admin_user column he always returns a value of "n" once I hit the Send button.
I can then go and you change this value after registration, and it will then submit the admin_user as column "Y".
Any ideas as to why its doing this and how to get it to stop?Is that occur when you add a new row of data?
Any chance that there is a lack of "n" somewhere when you add new data?
Jeff
-
Capabilities.screenResolutionY returning an incorrect value for the iPhone5
Hello
I'm trying to make gui adjustments based on the values returned by flash.system.Capabilities. However, when I test on the iPhone5 in portrait mode the values returned are screenResolutionX: '640' and screenResolutionY: '960'. I am compiling with air 3.5 in renderMode: "gpu" and put the swf metadata tp widthPercent: 100% and the heightPercent: 100%. I'm doing something wrong?
Thank you
CJ
To get the right size, you will need to include a splash screen for the size of the iPhone 5, with the name of "[email protected]". This image would be 640 x 1136, and when he sees iOS, it knows that you want the iPhone 5 to use the entire screen.
-
PIC search returns an incorrect value
I use advanced research VI for the tendency of a power spectrum amplitudes. Advanced VI research is not showing the correct amplitudes. They are off by a little bit every time. I watched the berries from the exit of the power spectrum, and I checked the cutting-edge research is get good input data but out something unexpected. I have advanced research for: 1) Single Max Peak, threshold = 0, start = 57.8 Hz, Stop = 59 Hz and 2) Single Max Peak, threshold = 0, Start = 61 Hz, Stop = 62.2 Hz. Or a poster of the correct value. I'll post my code, but the file I open is a .dat so I can't post that.
Research of spectrum VI made an adjustment to identify the peaks of the curve. Advanced search algorithm is described in the help:
Details of the spectrum SVFA cutting-edge research
The Spectrum Peak Search VI SVFA finds all of the peaks in the spectrum and makes an estimate amplitude/frequency or amplitude/order on each individual pic. The VI works on the ghosts of greatness and power.
Usually, the spectrum is calculated based on an input with windows signal. The closed shape of any COS, such as Hanning, Hamming, Blackman-Harris window and so on, is known. The presence of three dominant bins indicates a local maximum on power spectrum. So, when the Spectrum Peak Search VI SVFA locates the three dominant bins, a curve maps algorithm the shape of window on three bins and believes that the true frequency and amplitude of this particular tone. The following illustration of the diagrams of the concept of the algorithm.
==================
If you want the local maxima of the spectra, you can use the following code:
-
stageHeight returns an incorrect value
Hi guys,.
I am finally making the jump to AS3 and pressing on, so thanks for any help here (I still) search first.
Writing a custom for my application Document class. I just set up a simple GUI with a header bar, toolbar and background using the drawing API so far. But in trying to position dynamically, I can't seem to get the correct size of the height of my step. It is too short of 100px!
I write the code here in the hope, there's something stupid I do and you can point that out.
Thank you.
Jim.Well, I looked more and found that this is a stupid bug that does not (apparently) appear in the published swf file. I've never noticed this before because it's never happened to me before.
-
COS() returning incorrect values
Hi, anyone of you tried get values of cos() to native c++... ? It seems that sin values are correct, but the cos returns incorrect values. As for example, sin(pi/2) Returns infinity. No idea what could be wrong?
@SuhairZain,
#include
#include int main(void) { float pi = 3.14159265f; printf("Result: %f\n", sin(pi/2)); } Result: 1.000000
-
Numbers - return a Max Value if the Date is
Hello.
I am currently working with a numbers Document that records digital data on a specific day, often return several bits of data for any given day.
I am trying to create a function that finds all data entered on this day there and returns the maximum value.
Annoyingly, I was able to create a very similar function to the sum of all data entered the day with a D2 = SUMIF(A,A2,B) below,
Day County Total of days Day Max 19/2 50 SUMIF(Day,19/2,Count) returns 85 Must return 50 19/2 35 SUMIF(Day,19/2,Count) returns 85 Must return 50 20/2 62 SUMIF (day, 20/2, Count) returns 62 Must return 62 If someone could suggest how to return the required result, or wants to clarify the problem, please let me know.
Thank you.
I offer a way to simplify the problem:
If you allow multiple entries on the same line for a day then it really makes it easy.
K2 = COUNTA(B2:J2)
L2 = SUM (B2:J2)
M2 = MAX (B2:J2)
Select K2 they M2, copy
Select the K2 cells through the last cell in column M, dough
-
Compare multiple columns and return a different value
I have more access to excel and I'm running my previous workflow in numbers of duplication of issues.
I have a worksheet when a sheet with all my power tools. On the "Power Tools" sheet I have columns for the brand, Type, model, purchase date, etc... An example of this would be: pass a "DEWALT", "Jackhammer" Col B, Col C "DCD995M2" and so on.
I have a second sheet in the same document which is my front end if you want. I wanted to have selections for this dynamic drop-down list but it seems it is not possible without scripts, but is not the immediate question yet I'm the mention the case where someone knows a good fix. The second sheet "Sorting Test", I created manually drop-down boxes, one in column A of the brand and the other in column B for Type. I'll choose the brand and type and I want numbers autofill the rest of this line based on these two selections.
Example:
In the 'Sort Test' sheet I select DEWALT in column A and I select the drill in column B and I want DCD995M2 is displayed in column C and the purchase date in column D and so on.
Excel in it would be a game table or something similar. So far every site and search google only gave a lot of people who try to do VLOOKUP or correspond to errors, but I've really met anyone corresponding to two distinct cells from two separate columns and return data from this same line a match was found on.
I must also mention I'm really trying to avoid adding a hidden line that combines some of these but I know it's the most noticeable work around.
Basically, I want to match two selections separated against two separate columns, and when it finds the match, I want it returns a different value of this corresponding line how I got everything just copy this formula on adjacent cells and simply adjust to the column in the same row matched.
I know that I shouldn't do this on separate sheets, but it's just a choice that I made a point of design.
Any help would be appreciated, because I'm trying to really get the most out of the numbers, especially with how it syncs between desktop and mobile and I have more access to Excel.
You can it as what you do and why? This will help us understand what drives the design. Leave out how to solve the problem,
also post screenshots can be very useful
-
CVI2010-operator sizeof returns an incorrect size of a struct
Hello
in CVI2010 the sizeof operator returns an incorrect struct size if it contains 4 bytes and other spaces. I guess that the addresses in the struct are also not as c-programmer thinks. First a minimalist code example:
typedef struct
{
oneByte tank;
long fourByte;
} TestStruct;main void)
{
int size;
TestStruct tmpVar;
size = sizeof (TestStruct);
Here are the dimensions = 8 instead of 5}
Over the past years and last cvi-versions I had never compiled with the compiler Borland, which returns the correct size. Because the Borland compiler is not included in CVI 2010, I am using the compiler to build-in the standard. In my opinion, the compiler looks to optimize the code somehow, my project cannot work with.
Because I read the direct struct of binary files I'm looking for a to code based, solution.
Is it possible to disable the relevant optimization?
Thanks for your help and your response.
Markus
The compiler may have different alignments for the fields of the struct: a usual behavior is to them be aligned on a 4 byte boundary, that is each field starts on a multiple of 4 bytes from the beginning of the structure in memory. This seems to be the behavior of the compiler that you are using currently, who returns as the size of the structure 8 after aligning the fields.
Alignment of the structure can be modified with a #pragma appropriate preprocessor directive: adding #pragma pack (1); in your code tells the compiler to pack the structure without filler fields; After that this statement sizeof returns the size 5-bytes are waiting for you.
-
Incorrect value for PERM in TUXCONFIG
I get incorrect values of PERM in TUXCONFIG. I did not define PERM in my UBBCONFIG file so ideally, its value must be 0666 in the TUXCONFIG file. After tmloadcf running - there, I'm like value of PERM 0600. TUXCONFIG file generates also with 600 permissions. Is there something I miss or are there changes I need to make in UBBCNOFIG?
I use 12.1 Tuxedo.
Hello
Sorry about that. The default value has been changed some time back and apparently as part of the documentation was missing. Normally the best place to see the default values in the description of the file UBBCONFIG.
Kind regards
Todd little
Chief Architect of Oracle Tuxedo
-
You enter a value and tab out of af:inputListOfValues displays an incorrect value
Hello. I have a problem with the autosubmit and tab off af:inputListOfValues in my code.
Problem: When I type in a valid value and tab out of the field, it ignores the value, I entered and displays everything the first list in the result of the query instead regardless of the value that I typed.
My code snippet. What it does is simply a search for employee LoV unattached to an attribute of the entity, and depending on selection, it displays the name of the employee within the page. (it also retrieves a table view what employee number came into office)
< af:inputListOfValues id = "empNoId".
popupTitle = "search and select: #{bindings." EmpNo.hints.label}.
value = "#{bindings." EmpNo.inputValue}.
label = "#{bindings." EmpNo.hints.label}.
model = ' #{bindings. " EmpNo.listOfValuesModel}.
required = "#{bindings." EmpNo.hints.mandatory}.
columns = "#{bindings." EmpNo.hints.displayWidth}.
shortDesc = "#{bindings." EmpNo.hints.tooltip}.
Binding = "#{workLocationBean.txtEmpNo} '"
partialTriggers = "id1".
valueChangeListener = "{bean.onEmpNoChange}" "
autoSubmit = "true" >
< f: validator binding = "#{bindings." EmpNo.validator} "/ >"
< / af:inputListOfValues >
Other things to note:
When I enter a valid employee number and click anywhere on the page (not TAB), it behaves properly.
I tried to figure this out for days. Even my valueChangeListener Gets an incorrect value (when I do System.out) when I tab out, so I do not know where to catch them and replace it with the correct value.
Thank you.
This happens usually when the primary key is not defined in the view object used by LOV.
Dario
-
Return with incorrect serial number facility
Try installing Acrobat X Pro to a new computer with window 8.1.
With serial number of my products. Always returns with incorrect serial number.
You probably may need to contact the Support from Adobe. Sounds like a problem with the license, then you can try this KB: error of incorrect serial number
-
APEX_ITEM. DISPLAY_AND_SAVE: return as number value?
Hello
Apex 4.0.2.00.07, Oracle 11 g r2.
I need to use the APEX_ITEM. DISPLAY_AND_SAVE function in an interactive report (I need to be able to access its value using apex_application.g_f0x).
The displayed value is a numeric value:
SELECT [...], APEX_ITEM.DISPLAY_AND_SAVE(2, person_no), [...] FROM [...] WHERE [...]
The problem is that this function returns a varchar2 value, so that the column cannot be sorted correctly in the report.
I can't find a way to display the value as a number in an interactive report...
Any solution?
Thank you.
Yann.
Hello
Indeed, it is a solution.
I think it's a job improvised, but it works!
EDIT: Sorry, but I just saw that he does not for an interactive report as there is no "Expression HTML" option available. I used link column instead, redirect to javascript:void (0).
Thanks RecxLtd.
Maybe you are looking for
-
I have problem with my lphone6s when I want to download or go online or on wifi error come (code 1009) Please help I don't know what to do?
-
FN key not working after installing winxp on Satellite A200 1CJ
Hello I got my winxp pr satellite. And I found all drivers xp, including shortcut keys for my mobile on www.toshiba.nl.But now no longer works FN - F6, F7, F8, F9 & F10. These are the functions to configure the brightness, wireless network, power & u
-
Satellite L650D-11th - no camera on 8.1 Windows 64 bit
HelloI have a problem on a laptop to friends about the web camera. 64-bit Windows 8.1 do not recognize this (USB\DEVICE_DESCRIPTOR_FAILURE). I am aware that there is no driver even though I tried to install the utility, toshiba camera win7 64 bit com
-
Message in the form: "copy of windows is not genuine" in Windows Vista
Original title: Windows Vista After using my windows vista for 3 years, he now makes a message appear in the lower right of my screen and says: this copy of windows is not genuine. He does not ask for a product key. The program has been installed by
-
Family and dot net framework 3.5 sp1 update Setup error
Hi all my system is windows vista 32 bit sp1.whenever I use windows update to installIMP updates dot net framework 3.5 sp1 and update family gives x error 0643.After crossing the suggestion given for this error to microsoft, I tried tomanually instal