A decoding apparatus for image decoding, the decoding apparatus comprising: a memory; and at least one processor connected to the memory, the at least one processor configured to: obtain image information including a flag related to whether an intra Sub-Partitions, ISP, mode is applied and residual information from a bitstream; derive transform coefficients for a current block from the residual information; derive modified transform coefficients using a low-frequency non-separable transform, LFNST, matrix according to an LFNST index; derive residual samples for the current block by performing an inverse primary transform on the modified transform coefficients; and generate a reconstructed picture by adding the residual samples and prediction samples of the current block, wherein for the flag representing that the ISP mode is not applied to the current block, the LFNST index for the current block is parsed in response to a non-zero transform coefficient being present in a region other than a DC position of any one component block according to a tree type of the current block, wherein in response to the LFNST index being not parsed, a value of the LFNST index is derived as 0 and the modified transform coefficients are derived as the transform coefficients, characterized in that for the flag representing that ISP mode is applied to the current block, the LFNST index for the current block is parsed without considering whether a non-zero transform coefficient is present in the region other than the DC position of any one component block according to the tree type of the current block. a memory; and at least one processor connected to the memory, the at least one processor configured to: obtain image information including a flag related to whether an intra Sub-Partitions, ISP, mode is applied and residual information from a bitstream; derive transform coefficients for a current block from the residual information; derive modified transform coefficients using a low-frequency non-separable transform, LFNST, matrix according to an LFNST index; derive residual samples for the current block by performing an inverse primary transform on the modified transform coefficients; and generate a reconstructed picture by adding the residual samples and prediction samples of the current block, wherein for the flag representing that the ISP mode is not applied to the current block, the LFNST index for the current block is parsed in response to a non-zero transform coefficient being present in a region other than a DC position of any one component block according to a tree type of the current block, wherein in response to the LFNST index being not parsed, a value of the LFNST index is derived as 0 and the modified transform coefficients are derived as the transform coefficients, characterized in that for the flag representing that ISP mode is applied to the current block, the LFNST index for the current block is parsed without considering whether a non-zero transform coefficient is present in the region other than the DC position of any one component block according to the tree type of the current block. obtain image information including a flag related to whether an intra Sub-Partitions, ISP, mode is applied and residual information from a bitstream; derive transform coefficients for a current block from the residual information; derive modified transform coefficients using a low-frequency non-separable transform, LFNST, matrix according to an LFNST index; derive residual samples for the current block by performing an inverse primary transform on the modified transform coefficients; and generate a reconstructed picture by adding the residual samples and prediction samples of the current block, wherein for the flag representing that the ISP mode is not applied to the current block, the LFNST index for the current block is parsed in response to a non-zero transform coefficient being present in a region other than a DC position of any one component block according to a tree type of the current block, wherein in response to the LFNST index being not parsed, a value of the LFNST index is derived as 0 and the modified transform coefficients are derived as the transform coefficients, characterized in that for the flag representing that ISP mode is applied to the current block, the LFNST index for the current block is parsed without considering whether a non-zero transform coefficient is present in the region other than the DC position of any one component block according to the tree type of the current block.