diff options
Diffstat (limited to 'core/src/fxge/dib')
-rw-r--r-- | core/src/fxge/dib/fx_dib_composite.cpp | 2 | ||||
-rw-r--r-- | core/src/fxge/dib/fx_dib_convert.cpp | 3 | ||||
-rw-r--r-- | core/src/fxge/dib/fx_dib_main.cpp | 3 | ||||
-rw-r--r-- | core/src/fxge/dib/fx_dib_transform.cpp | 8 |
4 files changed, 9 insertions, 7 deletions
diff --git a/core/src/fxge/dib/fx_dib_composite.cpp b/core/src/fxge/dib/fx_dib_composite.cpp index 1bbe07725b..da555de9d5 100644 --- a/core/src/fxge/dib/fx_dib_composite.cpp +++ b/core/src/fxge/dib/fx_dib_composite.cpp @@ -3805,7 +3805,6 @@ void CFX_ScanlineCompositor::CompositeRgbBitmapLine(FX_LPBYTE dest_scan, FX_LPCB { int src_Bpp = (m_SrcFormat & 0xff) >> 3; int dest_Bpp = (m_DestFormat & 0xff) >> 3; - int dest_Size = width * dest_Bpp + 4; if (m_bRgbByteOrder) { switch (m_Transparency) { case 0: @@ -3886,6 +3885,7 @@ void CFX_ScanlineCompositor::CompositeRgbBitmapLine(FX_LPBYTE dest_scan, FX_LPCB } } } else { + int dest_Size = width * dest_Bpp + 4; if (dest_Size > m_CacheSize) { m_pCacheScanline = FX_Realloc(FX_BYTE, m_pCacheScanline, dest_Size); if (!m_pCacheScanline) { diff --git a/core/src/fxge/dib/fx_dib_convert.cpp b/core/src/fxge/dib/fx_dib_convert.cpp index 0120721e35..2a74452626 100644 --- a/core/src/fxge/dib/fx_dib_convert.cpp +++ b/core/src/fxge/dib/fx_dib_convert.cpp @@ -452,7 +452,7 @@ FX_BOOL _ConvertBuffer_RgbOrCmyk2Gray(FX_LPBYTE dest_buf, int dest_pitch, int wi src_scan += 4; } } - } else + } else { for (int row = 0; row < height; row ++) { FX_LPBYTE dest_scan = dest_buf + row * dest_pitch; FX_LPCBYTE src_scan = pSrcBitmap->GetScanline(src_top + row) + src_left * Bpp; @@ -461,6 +461,7 @@ FX_BOOL _ConvertBuffer_RgbOrCmyk2Gray(FX_LPBYTE dest_buf, int dest_pitch, int wi src_scan += Bpp; } } + } } return TRUE; } diff --git a/core/src/fxge/dib/fx_dib_main.cpp b/core/src/fxge/dib/fx_dib_main.cpp index 9b27a13daf..7644e39f02 100644 --- a/core/src/fxge/dib/fx_dib_main.cpp +++ b/core/src/fxge/dib/fx_dib_main.cpp @@ -1326,7 +1326,7 @@ FX_BOOL CFX_DIBitmap::ConvertColorScale(FX_DWORD forecolor, FX_DWORD backcolor) *scanline ++ = bk + (fk - bk) * gray / 255; } } - } else + } else { for (int row = 0; row < m_Height; row ++) { FX_LPBYTE scanline = m_pBuffer + row * m_Pitch; int gap = m_bpp / 8 - 2; @@ -1338,6 +1338,7 @@ FX_BOOL CFX_DIBitmap::ConvertColorScale(FX_DWORD forecolor, FX_DWORD backcolor) scanline += gap; } } + } return TRUE; } FX_BOOL CFX_DIBitmap::DitherFS(const FX_DWORD* pPalette, int pal_size, const FX_RECT* pRect) diff --git a/core/src/fxge/dib/fx_dib_transform.cpp b/core/src/fxge/dib/fx_dib_transform.cpp index 80475cbb1f..16d791b4ee 100644 --- a/core/src/fxge/dib/fx_dib_transform.cpp +++ b/core/src/fxge/dib/fx_dib_transform.cpp @@ -420,13 +420,13 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) } } else if (m_Flags & FXDIB_BICUBIC_INTERPOL) { CFX_BilinearMatrix result2stretch_fix(result2stretch, 8); - int pos_pixel[8]; for (int row = 0; row < m_ResultHeight; row ++) { FX_BYTE* dest_pos_mask = (FX_BYTE*)pTransformed->m_pAlphaMask->GetScanline(row); for (int col = 0; col < m_ResultWidth; col ++) { int src_col_l, src_row_l, res_x, res_y; result2stretch_fix.Transform(col, row, src_col_l, src_row_l, res_x, res_y); if (src_col_l >= 0 && src_col_l <= stretch_width && src_row_l >= 0 && src_row_l <= stretch_height) { + int pos_pixel[8]; int u_w[4], v_w[4]; if (src_col_l == stretch_width) { src_col_l--; @@ -493,13 +493,13 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) } } else if (m_Flags & FXDIB_BICUBIC_INTERPOL) { CFX_BilinearMatrix result2stretch_fix(result2stretch, 8); - int pos_pixel[8]; for (int row = 0; row < m_ResultHeight; row ++) { FX_LPBYTE dest_scan = (FX_LPBYTE)pTransformed->GetScanline(row); for (int col = 0; col < m_ResultWidth; col ++) { int src_col_l, src_row_l, res_x, res_y; result2stretch_fix.Transform(col, row, src_col_l, src_row_l, res_x, res_y); if (src_col_l >= 0 && src_col_l <= stretch_width && src_row_l >= 0 && src_row_l <= stretch_height) { + int pos_pixel[8]; int u_w[4], v_w[4]; if (src_col_l == stretch_width) { src_col_l--; @@ -593,13 +593,13 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) } } else if (m_Flags & FXDIB_BICUBIC_INTERPOL) { CFX_BilinearMatrix result2stretch_fix(result2stretch, 8); - int pos_pixel[8]; for (int row = 0; row < m_ResultHeight; row ++) { FX_BYTE* dest_pos = (FX_BYTE*)pTransformed->GetScanline(row); for (int col = 0; col < m_ResultWidth; col ++) { int src_col_l, src_row_l, res_x, res_y; result2stretch_fix.Transform(col, row, src_col_l, src_row_l, res_x, res_y); if (src_col_l >= 0 && src_col_l <= stretch_width && src_row_l >= 0 && src_row_l <= stretch_height) { + int pos_pixel[8]; int u_w[4], v_w[4]; if (src_col_l == stretch_width) { src_col_l--; @@ -706,13 +706,13 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) } } else if (m_Flags & FXDIB_BICUBIC_INTERPOL) { CFX_BilinearMatrix result2stretch_fix(result2stretch, 8); - int pos_pixel[8]; for (int row = 0; row < m_ResultHeight; row ++) { FX_BYTE* dest_pos = (FX_BYTE*)pTransformed->GetScanline(row); for (int col = 0; col < m_ResultWidth; col ++) { int src_col_l, src_row_l, res_x, res_y, r_pos_k_r = 0; result2stretch_fix.Transform(col, row, src_col_l, src_row_l, res_x, res_y); if (src_col_l >= 0 && src_col_l <= stretch_width && src_row_l >= 0 && src_row_l <= stretch_height) { + int pos_pixel[8]; int u_w[4], v_w[4]; if (src_col_l == stretch_width) { src_col_l--; |