320 self initializeFileNameToMimeTypeMapping |
320 self initializeFileNameToMimeTypeMapping |
321 " |
321 " |
322 ! |
322 ! |
323 |
323 |
324 initializeImageReaderMappings |
324 initializeImageReaderMappings |
|
325 |rdr| |
|
326 |
325 FileSuffixToImageReaderClassMapping isNil ifTrue:[ |
327 FileSuffixToImageReaderClassMapping isNil ifTrue:[ |
326 FileSuffixToImageReaderClassMapping := Dictionary new |
328 FileSuffixToImageReaderClassMapping := Dictionary new |
327 ]. |
329 ]. |
328 "MIME" TypeToImageReaderClassMapping isNil ifTrue:[ |
330 "MIME" TypeToImageReaderClassMapping isNil ifTrue:[ |
329 TypeToImageReaderClassMapping := Dictionary new |
331 TypeToImageReaderClassMapping := Dictionary new |
330 ]. |
332 ]. |
331 |
333 |
332 "/ setup mimeType to image reader class mapping ... |
334 "/ setup mimeType to image reader class mapping ... |
333 |
|
334 TypeToImageReaderClassMapping at:'image/jpeg' put:JPEGReader. |
335 TypeToImageReaderClassMapping at:'image/jpeg' put:JPEGReader. |
335 TypeToImageReaderClassMapping at:'image/gif' put:GIFReader. |
336 TypeToImageReaderClassMapping at:'image/gif' put:GIFReader. |
336 TypeToImageReaderClassMapping at:'image/tiff' put:TIFFReader. |
337 TypeToImageReaderClassMapping at:'image/tiff' put:TIFFReader. |
337 TypeToImageReaderClassMapping at:'image/png' put:PNGReader. |
338 TypeToImageReaderClassMapping at:'image/png' put:PNGReader. |
338 |
339 |
339 "/ setup suffix to image reader class mapping ... |
340 "/ setup suffix to image reader class mapping ... |
340 |
|
341 FileSuffixToImageReaderClassMapping at:'jpg' put:JPEGReader. |
341 FileSuffixToImageReaderClassMapping at:'jpg' put:JPEGReader. |
|
342 FileSuffixToImageReaderClassMapping at:'jpeg' put:JPEGReader. |
342 FileSuffixToImageReaderClassMapping at:'gif' put:GIFReader. |
343 FileSuffixToImageReaderClassMapping at:'gif' put:GIFReader. |
343 FileSuffixToImageReaderClassMapping at:'tif' put:TIFFReader. |
344 FileSuffixToImageReaderClassMapping at:'tif' put:TIFFReader. |
|
345 FileSuffixToImageReaderClassMapping at:'tiff' put:TIFFReader. |
344 FileSuffixToImageReaderClassMapping at:'png' put:PNGReader. |
346 FileSuffixToImageReaderClassMapping at:'png' put:PNGReader. |
345 |
347 |
346 WindowsIconReader notNil ifTrue:[ |
348 "/ some 'used-to-be-optional' readers |
347 TypeToImageReaderClassMapping at:'image/bmp' put:WindowsIconReader. |
349 (rdr := Smalltalk at:#WindowsIconReader) notNil ifTrue:[ |
348 FileSuffixToImageReaderClassMapping at:'bmp' put:WindowsIconReader. |
350 TypeToImageReaderClassMapping at:'image/bmp' put:rdr. |
349 ]. |
351 TypeToImageReaderClassMapping at:'image/x-MS-bmp' put:rdr. |
|
352 TypeToImageReaderClassMapping at:'image/x-MS-ico' put:rdr. |
|
353 FileSuffixToImageReaderClassMapping at:'bmp' put:rdr. |
|
354 FileSuffixToImageReaderClassMapping at:'ico' put:rdr. |
|
355 ]. |
|
356 (rdr := Smalltalk at:#XBMReader) notNil ifTrue:[ |
|
357 TypeToImageReaderClassMapping at:'image/x-xbitmap' put:rdr. |
|
358 FileSuffixToImageReaderClassMapping at:'xbm' put:rdr. |
|
359 ]. |
|
360 (rdr := Smalltalk at:#XPMReader) notNil ifTrue:[ |
|
361 TypeToImageReaderClassMapping at:'image/x-xpixmap' put:rdr. |
|
362 FileSuffixToImageReaderClassMapping at:'pm' put:rdr. |
|
363 ]. |
|
364 (rdr := Smalltalk at:#PBMReader) notNil ifTrue:[ |
|
365 TypeToImageReaderClassMapping at:'image/x-portable-pixmap' put:rdr. |
|
366 TypeToImageReaderClassMapping at:'image/x-portable-bitmap' put:rdr. |
|
367 TypeToImageReaderClassMapping at:'image/x-portable-graymap' put:rdr. |
|
368 TypeToImageReaderClassMapping at:'image/x-portable-anymap' put:rdr. |
|
369 FileSuffixToImageReaderClassMapping at:'ppm' put:rdr. |
|
370 FileSuffixToImageReaderClassMapping at:'pbm' put:rdr. |
|
371 FileSuffixToImageReaderClassMapping at:'pgm' put:rdr. |
|
372 FileSuffixToImageReaderClassMapping at:'pnm' put:rdr. |
|
373 ]. |
|
374 (rdr := Smalltalk at:#PCXReader) notNil ifTrue:[ |
|
375 TypeToImageReaderClassMapping at:'image/x-pcx' put:rdr. |
|
376 FileSuffixToImageReaderClassMapping at:'pcx' put:rdr. |
|
377 ]. |
|
378 (rdr := Smalltalk at:#TargaReader) notNil ifTrue:[ |
|
379 TypeToImageReaderClassMapping at:'image/x-targa' put:rdr. |
|
380 FileSuffixToImageReaderClassMapping at:'tga' put:rdr. |
|
381 ]. |
|
382 (rdr := Smalltalk at:#XWDReader) notNil ifTrue:[ |
|
383 TypeToImageReaderClassMapping at:'image/x-xwindowdump' put:rdr. |
|
384 TypeToImageReaderClassMapping at:'image/x-windowdump' put:rdr. |
|
385 FileSuffixToImageReaderClassMapping at:'xwd' put:rdr. |
|
386 ]. |
|
387 (rdr := Smalltalk at:#BlitImageReader) notNil ifTrue:[ |
|
388 TypeToImageReaderClassMapping at:'image/x-blitimage' put:rdr. |
|
389 FileSuffixToImageReaderClassMapping at:'48x48x1' put:rdr. |
|
390 ]. |
|
391 (rdr := Smalltalk at:#IrisRGBReader) notNil ifTrue:[ |
|
392 TypeToImageReaderClassMapping at:'image/x-rgb' put:rdr. |
|
393 FileSuffixToImageReaderClassMapping at:'rgb' put:rdr. |
|
394 ]. |
|
395 (rdr := Smalltalk at:#SunRasterReader) notNil ifTrue:[ |
|
396 TypeToImageReaderClassMapping at:'image/x-sunraster' put:rdr. |
|
397 FileSuffixToImageReaderClassMapping at:'im8' put:rdr. |
|
398 FileSuffixToImageReaderClassMapping at:'icon' put:rdr. |
|
399 ]. |
|
400 (rdr := Smalltalk at:#ST80FormReader) notNil ifTrue:[ |
|
401 TypeToImageReaderClassMapping at:'image/x-st80-form' put:rdr. |
|
402 FileSuffixToImageReaderClassMapping at:'form' put:rdr. |
|
403 ]. |
|
404 (rdr := Smalltalk at:#FaceReader) notNil ifTrue:[ |
|
405 TypeToImageReaderClassMapping at:'image/x-face' put:rdr. |
|
406 FileSuffixToImageReaderClassMapping at:'face' put:rdr. |
|
407 ]. |
|
408 (rdr := Smalltalk at:#PCDReader) notNil ifTrue:[ |
|
409 TypeToImageReaderClassMapping at:'image/x-photo-cd' put:rdr. |
|
410 FileSuffixToImageReaderClassMapping at:'pcd' put:rdr. |
|
411 ]. |
|
412 (rdr := Smalltalk at:#CMURasterReader) notNil ifTrue:[ |
|
413 TypeToImageReaderClassMapping at:'image/x-cmu-raster' put:rdr. |
|
414 FileSuffixToImageReaderClassMapping at:'ras' put:rdr. |
|
415 ]. |
|
416 |
|
417 "/ movie formats - experimantal and not yet complete / finished / delivered |
|
418 "/ (rdr := Smalltalk at:#FLIReader) notNil ifTrue:[ |
|
419 "/ TypeToImageReaderClassMapping at:'video/x-fli' put:rdr. |
|
420 "/ FileSuffixToImageReaderClassMapping at:'fli' put:rdr. |
|
421 "/ ]. |
|
422 "/ (rdr := Smalltalk at:#AVIReader) notNil ifTrue:[ |
|
423 "/ TypeToImageReaderClassMapping at:'video/x-msvideo' put:rdr. |
|
424 "/ FileSuffixToImageReaderClassMapping at:'avi' put:rdr. |
|
425 "/ ]. |
|
426 "/ (rdr := Smalltalk at:#AVIReader) notNil ifTrue:[ |
|
427 "/ TypeToImageReaderClassMapping at:'video/x-msvideo' put:rdr. |
|
428 "/ FileSuffixToImageReaderClassMapping at:'avi' put:rdr. |
|
429 "/ ]. |
|
430 "/ (rdr := Smalltalk at:#QuickTimeReader) notNil ifTrue:[ |
|
431 "/ TypeToImageReaderClassMapping at:'video/quicktime' put:rdr. |
|
432 "/ FileSuffixToImageReaderClassMapping at:'qt' put:rdr. |
|
433 "/ FileSuffixToImageReaderClassMapping at:'mov' put:rdr. |
|
434 "/ FileSuffixToImageReaderClassMapping at:'moov' put:rdr. |
|
435 "/ ]. |
|
436 "/ (rdr := Smalltalk at:#MPEG2Reader) notNil ifTrue:[ |
|
437 "/ TypeToImageReaderClassMapping at:'video/x-mpeg2' put:rdr. |
|
438 "/ FileSuffixToImageReaderClassMapping at:'mpg2' put:rdr. |
|
439 "/ FileSuffixToImageReaderClassMapping at:'mpv2' put:rdr. |
|
440 "/ FileSuffixToImageReaderClassMapping at:'mp2v' put:rdr. |
|
441 "/ FileSuffixToImageReaderClassMapping at:'mp2' put:rdr. |
|
442 "/ ]. |
|
443 "/ (rdr := Smalltalk at:#MPEGReader) notNil ifTrue:[ |
|
444 "/ TypeToImageReaderClassMapping at:'video/mpeg' put:rdr. |
|
445 "/ FileSuffixToImageReaderClassMapping at:'mpg' put:rdr. |
|
446 "/ FileSuffixToImageReaderClassMapping at:'mpeg' put:rdr. |
|
447 "/ FileSuffixToImageReaderClassMapping at:'mpe' put:rdr. |
|
448 "/ FileSuffixToImageReaderClassMapping at:'mpv' put:rdr. |
|
449 "/ FileSuffixToImageReaderClassMapping at:'vps' put:rdr. |
|
450 "/ FileSuffixToImageReaderClassMapping at:'mpegv' put:rdr. |
|
451 "/ ]. |
|
452 "/ (rdr := Smalltalk at:#SGIMovieReader) notNil ifTrue:[ |
|
453 "/ TypeToImageReaderClassMapping at:'video/x-sgi-movie' put:rdr. |
|
454 "/ FileSuffixToImageReaderClassMapping at:'movie' put:rdr. |
|
455 "/ ]. |
350 ! |
456 ! |
351 |
457 |
352 initializeParenthesisSpecMappings |
458 initializeParenthesisSpecMappings |
353 |spec| |
459 |spec| |
354 |
460 |