You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RangeError (index): Index out of range: index should be less than 89752: 1701999736 #0 Uint8List.[] (dart:typed_data-patch/typed_data_patch.dart:2259:7)
#690
Open
insinfo opened this issue
Oct 24, 2024
· 4 comments
Future<WpImage?> insereImage(int autorId, File imageFile,
{DateTime? data, String? legenda, String? siteUrl}) async {
final basePath = basePathUploads;
final now =DateTime.now();
// post_datefinal dataPub = data ?? now;
// Data em UTCfinal dataPubUtc = dataPub.toUtc().subtract(Duration(hours:3));
final ano = dataPubUtc.year;
final mes = dataPubUtc.month;
final siteFullurl = siteUrl ??awaitgetSiteUrl();
final nomeImagemOriginal = path.basename(imageFile.path);
final mimeType =mime(nomeImagemOriginal);
if (mimeType ==null) {
throwException('Não foi possivel obter mimeType do arquivo');
}
final fileExtension = path.extension(nomeImagemOriginal);
final fileName = path.basenameWithoutExtension(nomeImagemOriginal);
Image imageOriginal;
try {
final imageOriginalBytes =await imageFile.readAsBytes();
imageOriginal =decodeNamedImage(imageFile.path, imageOriginalBytes)!;
} catch (e, s) {
print('erro ao decodificar imagem ${imageFile.path} $e $s');
returnnull;
}
...
erro ao decodificar imagem Z:/desenvolvimento/backups/SiteAntigoPMRO_16.12.16/Portal 3.0/img/n2716.jpg RangeError (index): Index out of range: index should be less than 89752: 1701999736 #0 Uint8List.[] (dart:typed_data-patch/typed_data_patch.dart:2259:7)#1 InputBuffer.readUint16 (package:image/src/util/input_buffer.dart:167:22)#2 ExifData.read (package:image/src/exif/exif_data.dart:277:32)#3 JpegData._readExifData (package:image/src/formats/jpeg/jpeg_data.dart:319:10)#4 JpegData._readAppData (package:image/src/formats/jpeg/jpeg_data.dart:345:7)#5 JpegData._read (package:image/src/formats/jpeg/jpeg_data.dart:205:11)#6 JpegData.read (package:image/src/formats/jpeg/jpeg_data.dart:154:5)#7 JpegDecoder.decode (package:image/src/formats/jpeg_decoder.dart:48:30)#8 decodeNamedImage (package:image/src/formats/formats.dart:241:20)#9 insereImage (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:594:21)<asynchronous suspension>#10 importaNoticias (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:430:25)<asynchronous suspension>#11 main (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:403:3)<asynchronous suspension>erro ao decodificar imagem Z:/desenvolvimento/backups/SiteAntigoPMRO_16.12.16/Portal 3.0/img/n2717.jpg RangeError (index): Index out of range: index should be less than 24882: 65957 #0 Uint8List.[] (dart:typed_data-patch/typed_data_patch.dart:2259:7)#1 InputBuffer.readUint16 (package:image/src/util/input_buffer.dart:167:22)#2 ExifData.read (package:image/src/exif/exif_data.dart:277:32)#3 JpegData._readExifData (package:image/src/formats/jpeg/jpeg_data.dart:319:10)#4 JpegData._readAppData (package:image/src/formats/jpeg/jpeg_data.dart:345:7)#5 JpegData._read (package:image/src/formats/jpeg/jpeg_data.dart:205:11)#6 JpegData.read (package:image/src/formats/jpeg/jpeg_data.dart:154:5)#7 JpegDecoder.decode (package:image/src/formats/jpeg_decoder.dart:48:30)#8 decodeNamedImage (package:image/src/formats/formats.dart:241:20)#9 insereImage (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:594:21)<asynchronous suspension>#10 importaNoticias (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:430:25)<asynchronous suspension>#11 main (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:403:3)<asynchronous suspension>erro ao decodificar imagem Z:/desenvolvimento/backups/SiteAntigoPMRO_16.12.16/Portal 3.0/img/n2715.jpg RangeError (index): Index out of range: index should be less than 31398: 694642044 #0 Uint8List.[] (dart:typed_data-patch/typed_data_patch.dart:2259:7)#1 InputBuffer.readUint16 (package:image/src/util/input_buffer.dart:167:22)#2 ExifData.read (package:image/src/exif/exif_data.dart:277:32)#3 JpegData._readExifData (package:image/src/formats/jpeg/jpeg_data.dart:319:10)#4 JpegData._readAppData (package:image/src/formats/jpeg/jpeg_data.dart:345:7)#5 JpegData._read (package:image/src/formats/jpeg/jpeg_data.dart:205:11)#6 JpegData.read (package:image/src/formats/jpeg/jpeg_data.dart:154:5)#7 JpegDecoder.decode (package:image/src/formats/jpeg_decoder.dart:48:30)#8 decodeNamedImage (package:image/src/formats/formats.dart:241:20)#9 insereImage (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:594:21)<asynchronous suspension>#10 importaNoticias (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:430:25)<asynchronous suspension>#11 main (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:403:3)<asynchronous suspension>erro ao decodificar imagem Z:/desenvolvimento/backups/SiteAntigoPMRO_16.12.16/Portal 3.0/img/n2715_2.jpg RangeError (index): Index out of range: index should be less than 27200: 1701838860 #0 Uint8List.[] (dart:typed_data-patch/typed_data_patch.dart:2259:7)#1 InputBuffer.readUint16 (package:image/src/util/input_buffer.dart:167:22)#2 ExifData.read (package:image/src/exif/exif_data.dart:277:32)#3 JpegData._readExifData (package:image/src/formats/jpeg/jpeg_data.dart:319:10)#4 JpegData._readAppData (package:image/src/formats/jpeg/jpeg_data.dart:345:7)#5 JpegData._read (package:image/src/formats/jpeg/jpeg_data.dart:205:11)#6 JpegData.read (package:image/src/formats/jpeg/jpeg_data.dart:154:5)#7 JpegDecoder.decode (package:image/src/formats/jpeg_decoder.dart:48:30)#8 decodeNamedImage (package:image/src/formats/formats.dart:241:20)#9 insereImage (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:594:21)<asynchronous suspension>#10 importaNoticias (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:430:25)<asynchronous suspension>#11 main (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:403:3)<asynchronous suspension>erro ao decodificar imagem Z:/desenvolvimento/backups/SiteAntigoPMRO_16.12.16/Portal 3.0/img/n2721_2.jpg RangeError (index): Index out of range: index should be less than 33784: 33784 #0 Uint8List.[] (dart:typed_data-patch/typed_data_patch.dart:2259:7)#1 InputBuffer.readUint32 (package:image/src/util/input_buffer.dart:194:22)#2 ExifData._readEntry (package:image/src/exif/exif_data.dart:331:25)#3 ExifData.read.<anonymous closure> (package:image/src/exif/exif_data.dart:279:30)#4 new _GrowableList.generate (dart:core-patch/growable_array.dart:136:28)#5 ExifData.read (package:image/src/exif/exif_data.dart:278:19)#6 JpegData._readExifData (package:image/src/formats/jpeg/jpeg_data.dart:319:10)#7 JpegData._readAppData (package:image/src/formats/jpeg/jpeg_data.dart:345:7)#8 JpegData._read (package:image/src/formats/jpeg/jpeg_data.dart:205:11)#9 JpegData.read (package:image/src/formats/jpeg/jpeg_data.dart:154:5)#10 JpegDecoder.decode (package:image/src/formats/jpeg_decoder.dart:48:30)#11 decodeNamedImage (package:image/src/formats/formats.dart:241:20)#12 insereImage (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:594:21)<asynchronous suspension>#13 importaNoticias (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:430:25)<asynchronous suspension>#14 main (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:403:3)<asynchronous suspension>erro ao decodificar imagem Z:/desenvolvimento/backups/SiteAntigoPMRO_16.12.16/Portal 3.0/img/n2721_3.jpg RangeError (index): Index out of range: index should be less than 29072: 262156 #0 Uint8List.[] (dart:typed_data-patch/typed_data_patch.dart:2259:7)#1 InputBuffer.readUint16 (package:image/src/util/input_buffer.dart:167:22)#2 ExifData.read (package:image/src/exif/exif_data.dart:277:32)#3 JpegData._readExifData (package:image/src/formats/jpeg/jpeg_data.dart:319:10)#4 JpegData._readAppData (package:image/src/formats/jpeg/jpeg_data.dart:345:7)#5 JpegData._read (package:image/src/formats/jpeg/jpeg_data.dart:205:11)#6 JpegData.read (package:image/src/formats/jpeg/jpeg_data.dart:154:5)#7 JpegDecoder.decode (package:image/src/formats/jpeg_decoder.dart:48:30)#8 decodeNamedImage (package:image/src/formats/formats.dart:241:20)#9 insereImage (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:594:21)<asynchronous suspension>#10 importaNoticias (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:430:25)<asynchronous suspension>#11 main (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:403:3)<asynchronous suspension>erro ao decodificar imagem Z:/desenvolvimento/backups/SiteAntigoPMRO_16.12.16/Portal 3.0/img/n2726.jpg RangeError (index): Index out of range: index should be less than 90650: 1935438718 #0 Uint8List.[] (dart:typed_data-patch/typed_data_patch.dart:2259:7)#1 InputBuffer.readUint16 (package:image/src/util/input_buffer.dart:167:22)#2 ExifData.read (package:image/src/exif/exif_data.dart:277:32)#3 JpegData._readExifData (package:image/src/formats/jpeg/jpeg_data.dart:319:10)#4 JpegData._readAppData (package:image/src/formats/jpeg/jpeg_data.dart:345:7)#5 JpegData._read (package:image/src/formats/jpeg/jpeg_data.dart:205:11)#6 JpegData.read (package:image/src/formats/jpeg/jpeg_data.dart:154:5)#7 JpegDecoder.decode (package:image/src/formats/jpeg_decoder.dart:48:30)#8 decodeNamedImage (package:image/src/formats/formats.dart:241:20)#9 insereImage (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:594:21)<asynchronous suspension>#10 importaNoticias (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:430:25)<asynchronous suspension>#11 main (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:403:3)<asynchronous suspension>erro ao decodificar imagem Z:/desenvolvimento/backups/SiteAntigoPMRO_16.12.16/Portal 3.0/img/n2726_2.jpg RangeError (index): Index out of range: index should be less than 29015: 786444 #0 Uint8List.[] (dart:typed_data-patch/typed_data_patch.dart:2259:7)#1 InputBuffer.readUint16 (package:image/src/util/input_buffer.dart:167:22)#2 ExifData.read (package:image/src/exif/exif_data.dart:277:32)#3 JpegData._readExifData (package:image/src/formats/jpeg/jpeg_data.dart:319:10)#4 JpegData._readAppData (package:image/src/formats/jpeg/jpeg_data.dart:345:7)#5 JpegData._read (package:image/src/formats/jpeg/jpeg_data.dart:205:11)#6 JpegData.read (package:image/src/formats/jpeg/jpeg_data.dart:154:5)#7 JpegDecoder.decode (package:image/src/formats/jpeg_decoder.dart:48:30)#8 decodeNamedImage (package:image/src/formats/formats.dart:241:20)#9 insereImage (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:594:21)<asynchronous suspension>#10 importaNoticias (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:430:25)<asynchronous suspension>#11 main (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:403:3)<asynchronous suspension>erro ao decodificar imagem Z:/desenvolvimento/backups/SiteAntigoPMRO_16.12.16/Portal 3.0/img/n2719.jpg RangeError (index): Index out of range: index should be less than 34604: 6816105 #0 Uint8List.[] (dart:typed_data-patch/typed_data_patch.dart:2259:7)#1 InputBuffer.readUint16 (package:image/src/util/input_buffer.dart:167:22)#2 ExifData.read (package:image/src/exif/exif_data.dart:277:32)#3 JpegData._readExifData (package:image/src/formats/jpeg/jpeg_data.dart:319:10)#4 JpegData._readAppData (package:image/src/formats/jpeg/jpeg_data.dart:345:7)#5 JpegData._read (package:image/src/formats/jpeg/jpeg_data.dart:205:11)#6 JpegData.read (package:image/src/formats/jpeg/jpeg_data.dart:154:5)#7 JpegDecoder.decode (package:image/src/formats/jpeg_decoder.dart:48:30)#8 decodeNamedImage (package:image/src/formats/formats.dart:241:20)#9 insereImage (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:594:21)<asynchronous suspension>#10 importaNoticias (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:430:25)<asynchronous suspension>#11 main (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:403:3)<asynchronous suspension>erro ao decodificar imagem Z:/desenvolvimento/backups/SiteAntigoPMRO_16.12.16/Portal 3.0/img/n2725.jpg RangeError (index): Index out of range: index should be less than 29083: 3085975044 #0 Uint8List.[] (dart:typed_data-patch/typed_data_patch.dart:2259:7)#1 InputBuffer.readUint16 (package:image/src/util/input_buffer.dart:167:22)#2 ExifData._readEntry (package:image/src/exif/exif_data.dart:329:23)#3 ExifData.read.<anonymous closure> (package:image/src/exif/exif_data.dart:279:30)#4 new _GrowableList.generate (dart:core-patch/growable_array.dart:136:28)#5 ExifData.read (package:image/src/exif/exif_data.dart:278:19)#6 JpegData._readExifData (package:image/src/formats/jpeg/jpeg_data.dart:319:10)#7 JpegData._readAppData (package:image/src/formats/jpeg/jpeg_data.dart:345:7)#8 JpegData._read (package:image/src/formats/jpeg/jpeg_data.dart:205:11)#9 JpegData.read (package:image/src/formats/jpeg/jpeg_data.dart:154:5)#10 JpegDecoder.decode (package:image/src/formats/jpeg_decoder.dart:48:30)#11 decodeNamedImage (package:image/src/formats/formats.dart:241:20)#12 insereImage (file:///C:/MyDartProjects/pg_query/examples/high_level/web_scraping.dart:594:21)
I'm having trouble decoding jpeg images
photos.zip
The text was updated successfully, but these errors were encountered: