equal
deleted
inserted
replaced
164 { |
164 { |
165 TJpegImageData* imageData = new(ELeave) TJpegImageData(); |
165 TJpegImageData* imageData = new(ELeave) TJpegImageData(); |
166 CleanupStack::PushL(imageData); |
166 CleanupStack::PushL(imageData); |
167 imageData->iSampleScheme = iGreyscale ? TJpegImageData::EMonochrome : TJpegImageData::EColor444; |
167 imageData->iSampleScheme = iGreyscale ? TJpegImageData::EMonochrome : TJpegImageData::EColor444; |
168 imageData->iQualityFactor = iQuality; |
168 imageData->iQualityFactor = iQuality; |
169 iFrameImageData = CFrameImageData::NewL(); |
169 TRAPL(iFrameImageData = CFrameImageData::NewL(), _L("Couldn't create CFrameImageData")); |
170 User::LeaveIfError(iFrameImageData->AppendImageData(imageData)); |
170 LeaveIfErr(iFrameImageData->AppendImageData(imageData), _L("Failed to write image data to TJpegImageData")); |
171 CleanupStack::Pop(imageData); |
171 CleanupStack::Pop(imageData); |
172 } |
172 } |
173 else if (aEncodingUid == KImageTypeGIFUid) |
173 else if (aEncodingUid == KImageTypeGIFUid) |
174 { |
174 { |
175 if (iGreyscale) |
175 if (iGreyscale) |
223 SetActive(); |
223 SetActive(); |
224 } |
224 } |
225 |
225 |
226 void CCmdGrabscreen::RunL() |
226 void CCmdGrabscreen::RunL() |
227 { |
227 { |
228 User::LeaveIfError(iStatus.Int()); |
228 LeaveIfErr(iStatus.Int(), _L("Error returned from CImageEncoder::Convert")); |
229 if (!iArguments.IsPresent(0)) |
229 if (!iArguments.IsPresent(0)) |
230 { |
230 { |
231 User::LeaveIfNull(iImageData); |
231 User::LeaveIfNull(iImageData); |
232 |
232 |
233 Stdout().SetModeL(RIoReadWriteHandle::EBinary); |
233 Stdout().SetModeL(RIoReadWriteHandle::EBinary); |