Should different codes be used in 64-bit for "fprintf and fclose"?

0 views
Skip to first unread message

paul.s...@telenet.be

unread,
Mar 10, 2026, 10:47:18 AM (9 days ago) Mar 10
to filtermeister
Hi All,

Recompiling previous filter codes to 64-bit with AfhFM109h_x64.8bf works almost flawlessly, except for some minor details. However, I can't solve one filter. It works perfectly in 32-bit with AfhFM109h, but Photoshop crashes immediately with it in 64-bit. The problem is printing pixel values ​​to text. Step by step, I was able to isolate the core of the problem. It concerns the codes: "fprintf and fclose( )".

Below you can see the main lines of the filter.


allocArray( 0, ieX0, ieY0, 0, 4);
iv00 =fopen( "C:\\FM\\TestData\\Pix2Text_00.txt", "w"); // Opens file for writing
///3////////////////////////////////////////////////////////////.///
ieX0c =ieX0 -1; // last coordinate x
///0//////////.///
for( iy0 =0; iy0 <ieY0; iy0++) {
for( ix0 =0; ix0 <ieX0; ix0++) {
///0//////////.///
putArray( 0, ix0, iy0, 0, src( ix0, iy0, 0)); // fill Array0 with pixel values
///0//////////.///
}}  // End_for_iy0, ix0
///3////////////////////////////////////////////////////////////.///
///3////////////////////////////////////////////////////////////.///
for( iy0 =0; iy0 <ieY0; iy0++) {
for( ix0 =0; ix0 <ieX0; ix0++) {
///0//////////.///
iA0 =getArray( 0, ix0, iy0, 0);
if( ix0 !=iwX0c) {
fprintf( iv00, "%d,", iA0); } // attention, comma separator!
else {
fprintf( iv00, "%d\n", iA0); } // new line
///0//////////.///
}}  // End_for_iy0, ix0
///3////////////////////////////////////////////////////////////.///
fclose( iv00);


Should different codes be used in 64-bit for "fprintf and fclose"?


Regards, Paul



Reply all
Reply to author
Forward
0 new messages