no thumbnail for .rgb file

linyi1982

Joined: 2010-01-22
Posts: 13
Posted: Fri, 2010-01-22 16:05

I have upload a .rgb file ,but no thumbnail.How can I confige to support thumbnail in gallery 2 for .rgb file.I use convet in command line.It can convet .rgb to .jpg.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2010-01-22 17:23

image/x-rgb? or video/x-raw-rgb?

if its an image, try adding the extension to the jpeg mimetype in gallery admin -> MIME Types (MIME Maintenance Module)

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
linyi1982

Joined: 2010-01-22
Posts: 13
Posted: Sat, 2010-01-23 02:31

Thanks to suprsidr. I have adding the extension to the jpeg mimetype .But there is no thumbnail too. The imageMagic test result like following:
image/gif
image/jpeg
image/pjpeg
image/jp2
image/jpg2
image/jpx
image/png
image/tiff
image/svg+xml
image/bmp
application/photoshop
image/x-photo-cd
image/wmf
image/tga
image/jpeg-cmyk
image/tiff-cmyk
application/photoshop-cmyk

but in MineType Manager it display following:
application/andrew-inset ez
application/mac-binhex40 hqx
application/mac-compactpro cpt
application/msword doc
application/octet-stream so, dll, dms, class, bin, exe, lzh, lha
application/oda oda
application/pdf pdf
application/photoshop psd
application/postscript ps, eps, ai
application/smil smil, smi
application/vnd.mif mif
application/vnd.ms-excel xls
application/vnd.ms-powerpoint ppt
application/vnd.visio vsd
application/vnd.wap.wbxml wbxml
application/vnd.wap.wmlc wmlc
application/vnd.wap.wmlscriptc wmlsc
application/x-bcpio bcpio
application/x-cdlink vcd
application/x-chess-pgn pgn
application/x-compress z
application/x-cpio cpio
application/x-csh csh
application/x-director dcr, dxr, dir
application/x-dvi dvi
application/x-futuresplash spl
application/x-gtar gtar
application/x-gzip gz
application/x-hdf hdf
application/x-javascript js
application/x-koan skd, skm, skt, skp
application/x-latex latex
application/x-netcdf nc, cdf
application/x-sh sh
application/x-shar shar
application/x-shockwave-flash swf
application/x-stuffit sit
application/x-sv4cpio sv4cpio
application/x-sv4crc sv4crc
application/x-tar tar
application/x-tcl tcl
application/x-tex tex
application/x-texinfo texi, texinfo
application/x-troff tr, t, roff
application/x-troff-man man
application/x-troff-me me
application/x-troff-ms ms
application/x-ustar ustar
application/x-wais-source src
application/zip zip
audio/basic au, snd
audio/midi kar, midi, mid
audio/mpeg mp3, mp2, mpga
audio/x-aiff aif, aifc, aiff
audio/x-mpegurl m3u
audio/x-ms-wma wma
audio/x-pn-realaudio rm, ram
audio/x-pn-realaudio-plugin rpm
audio/x-realaudio ra
audio/x-wav wav
chemical/x-pdb pdb
chemical/x-xyz xyz
image/bmp bmp
image/gif gif
image/ief ief
image/jp2 jpg2, jp2
image/jpeg jpg, jpe, jpeg
image/jpeg-cmyk jpgcmyk
image/jpgm jpgm
image/jpm jpm
image/jpx jpf, jpx
image/png png
image/svg+xml svg
image/tga tga
image/tiff tiff, tif
image/tiff-cmyk tifcmyk
image/vnd.djvu djvu, djv
image/vnd.wap.wbmp wbmp
image/wmf wmf
image/x-cmu-raster ras
image/x-photo-cd pcd
image/x-portable-anymap pnm
image/x-portable-bitmap pbm
image/x-portable-graymap pgm
image/x-portable-pixmap ppm
image/x-rgb rgb
image/x-xbitmap xbm
image/x-xpixmap xpm
image/x-xwindowdump xwd
model/iges igs, iges
model/mesh silo, msh, mesh
model/vrml wrl, vrml
text/css css
text/plain asc, txt
text/richtext rtx
text/rtf rtf
text/sgml sgml, sgm
text/tab-separated-values tsv
text/vnd.wap.wml wml
text/vnd.wap.wmlscript wmls
text/x-setext etx
text/xml xsl
video/mj2 mjp2, mj2
video/mp4 mp4
video/mpeg mpe, mpeg, mpg
video/quicktime qt, mov
video/vnd.mpegurl mxu
video/x-flv flv
video/x-ms-asf asf
video/x-ms-asx asx
video/x-ms-wmv wmv
video/x-msvideo avi
video/x-sgi-movie movie
x-conference/x-cooltalk ice

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2010-01-23 02:40

my point was to add the .rbg extension to the image/jpeg mime type so gallery would treat it as a jpeg not to add a new mime type for image/x-rgb(gallery does not know what to do with that)

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
linyi1982

Joined: 2010-01-22
Posts: 13
Posted: Sat, 2010-01-23 10:41

Hi suprsidr.I followed your suggesstion.I add the .rbg extension to the image/jpeg mime type.Really,gallery treat it as jpeg files.However I get broken thumbnails .I think we can not treat it as image/jpeg.Because gallery get ERROR_TOOLKIT_FAILURE:
The error info like below:
Error (ERROR_TOOLKIT_FAILURE)in modules\imagemagick\classes\ImageMagickToolkit.class at line 399 (GalleryCoreApi::error) in modules\imagemagick\classes\ImageMagickToolkit.class at line 40 (ImageMagickToolkit::_getImageDimensions) in modules\core\classes\GalleryDerivativeImage.class at line 166
........

RGB files were developed by Silicon Graphics, Incorporated (SGI), and were commonly used for storing textures. Such texture files were often "borrowed" by other graphics systems, including Open Inventor.

The RGB format stores three color values, R, G and B, for each pixel. There are two related formats, "BW", which is a black and white format that stores only one color value per pixel, and "RGBA", which stores a fourth alpha channel component, which measures transparency.

 
linyi1982

Joined: 2010-01-22
Posts: 13
Posted: Sat, 2010-01-23 07:05

I think I need to enable imagemagic treat image/x-rgb files properly in gallery just like in command line modul.But I do not know how to do.Or I can treat image/x-rgb as another type aready treat well in gallery.Thanks.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2010-01-23 13:06

the toolkit is failing @ getImageDimensions which is a generic function to try to gleam basic info about an image.
apparently rgb files donot contain the info or the IM's identify command is returning an error.
at the failure point we have not even reached convert.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
linyi1982

Joined: 2010-01-22
Posts: 13
Posted: Sun, 2010-01-24 01:11

But how I would do to enable gallery to generate thumbnail for .rgb file.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sun, 2010-01-24 01:55

If none of the graphics toolkits Gallery uses can read rgb files or create thumbnails, then Gallery can't generate thumbnails.

Can you attach or post a link to one of these rgb files?

Also, do you have SSH access? If so, type convert --version and let us know what version of ImageMagick is installed
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
linyi1982

Joined: 2010-01-22
Posts: 13
Posted: Sun, 2010-01-24 02:26

My ImageMagick version is:
Version: ImageMagick 6.5.8-8 2009-12-18 Q8 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP
In commad line I can use convert **.rgb to **.jpg successfully.The .rgb file almost content texture image.

Detailed information for file extension RGB:
Primary association: Silicon Graphics
Company: Silicon Graphics, Inc.
File classification: Graphic
Mime type: image/rgb, image/x-rgb
Identifying characters Hex: 01 DA 01 01 00 03
Related links: XnView, The GIMP

The link to .rgb files:
http://people.sc.fsu.edu/~burkardt/data/rgb/birch.rgb
Thanks!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2010-01-24 03:07

Ok, I added rgb support (my test)
You must uninstall the imagemagick module, replace with the fixed version attached and re-install/test new module.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
linyi1982

Joined: 2010-01-22
Posts: 13
Posted: Sun, 2010-01-24 04:06

Wonderful!Thank you very much!
Suprsidr,whitch version of your gallery and imagemagick.
I encounter some difficulty in update my gallery.
My gallery version is 2.3.1.
ImageMagick version is:
Version: ImageMagick 6.5.8-8 2009-12-18 Q8

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2010-01-24 04:39

You have to uninstall/remove your current IM module you cannot simply rename it.
upload/install/test/save my module

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
linyi1982

Joined: 2010-01-22
Posts: 13
Posted: Sun, 2010-01-24 04:48

Suprsidr,I have a question!
I have update my imageMagick modul and reinstalled it.
I test imageMagick,it get followed information :
ImageMagick 6.5.8-8

supported MIME type:
image/gif
image/jpeg
image/pjpeg
image/jp2
image/jpg2
image/jpx
image/png
image/tiff
image/svg+xml
image/bmp
application/photoshop
image/x-photo-cd
image/wmf
image/tga
image/x-rgb
image/jpeg-cmyk
image/tiff-cmyk
application/photoshop-cmyk

It seems it work well.

 
linyi1982

Joined: 2010-01-22
Posts: 13
Posted: Sun, 2010-01-24 04:50

But when I upload the .rgb file.
It get followed error message:
Error (ERROR_TOOLKIT_FAILURE)in modules\imagemagick\classes\ImageMagickToolkit.class at line 399 (GalleryCoreApi::error) in modules\imagemagick\classes\ImageMagickToolkit.class at line 40 (ImageMagickToolkit::_getImageDimensions) in modules\core\classes\GalleryDerivativeImage.class at line 167 (ImageMagickToolkit::getProperty) in modules\core\classes\helpers\GalleryDerivativeHelper_advanced.class at line 844 (GalleryDerivativeImage::rebuildCache) in modules\core\classes\GalleryCoreApi.class at line 997 (GalleryDerivativeHelper_advanced::rebuildCache) in modules\core\classes\helpers\GalleryDerivativeHelper_simple.class at line 50 (GalleryCoreApi::rebuildDerivativeCache) in modules\core\classes\GalleryCoreApi.class at line 984 (GalleryDerivativeHelper_simple::rebuildCacheIfNotCurrent) in modules\core\CreateThumbnailOption.inc at line 66 (GalleryCoreApi::rebuildDerivativeCacheIfNotCurrent) in modules\core\ItemAdd.inc at line 351 (CreateThumbnailOption::handleRequestAfterAdd) in modules\core\ItemAdd.inc at line 166 (ItemAddController::postprocessItems) in ??? at line 0 (ItemAddController::handleRequestWithProgressBar) in modules\core\classes\GalleryTemplateAdapter.class at line 1089 in D:\uploadImage\smarty\templates_c\%%3462433204\matrix\%%3A^3A8^3A818B59%%theme.tpl.php at line 75 (GalleryTemplateAdapter::trailer) in lib\smarty\Smarty.class.php at line 1255 in modules\core\classes\GallerySmarty.class at line 61 (Smarty::fetch) in modules\core\classes\GalleryTemplate.class at line 241 (GallerySmarty::fetch) in main.php at line 507 (GalleryTemplate::display) in main.php at line 105 in main.php at line 89 Request variables: Array ( [return] => /gallery2.3.1/main.php [formUrl] => /gallery2.3.1/main.php?g2_view=core.ItemAdmin&g2_subView=core.ItemAdd&g2_itemId=7 [authToken] => d5111760c8ac [controller] => core.ItemAdd [form] => Array ( [formName] => ItemAddFromBrowser [caption] => Array ( [1] => 23234 [2] => [3] => [4] => [5] => [6] => [7] => [8] => [9] => [10] => [11] => [12] => [13] => [14] => [15] => [16] => [17] => [18] => [19] => [20] => ) [set] => Array ( [title] => caption [summary] => on [description] => on ) [CreateThumbnailOption] => Array ( [createThumbnail] => on ) [action] => Array ( [addFromBrowser] => 添加项目 ) ) [itemId] => 7 [addPlugin] => ItemAddFromBrowser )

 
linyi1982

Joined: 2010-01-22
Posts: 13
Posted: Sun, 2010-01-24 04:52

Whether I would to delete image/x-rgb MINE type. And add .rgb extention to image/jpeg MINE TYPE.Waiting for your reply!Thank you!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2010-01-24 05:01

No, you need to make sure image/x-rgb with extension rgb exists in mime types and make sure you remove rgb extension from image/jpeg

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
linyi1982

Joined: 2010-01-22
Posts: 13
Posted: Sun, 2010-01-24 05:15

I followed your suggesstion.But it still get error! I want to reinstall gallery of which version you use and the imageMagick too.Can you tell me version of your gallery and imagemagick.
Thak you!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2010-01-24 05:23

I'm using gallery 2.3.0
Version

ImageMagick 6.3.6
Supported MIME Types

The ImageMagick module can support files with the following MIME types:

image/gif
image/jpeg
image/pjpeg
image/jp2
image/jpg2
image/jpx
image/png
image/tiff
image/svg+xml
image/bmp
application/pdf
application/postscript
application/photoshop
image/x-photo-cd
image/tga
image/x-rgb
image/jpeg-cmyk
image/tiff-cmyk
application/photoshop-cmyk

all of which should make absolutely no difference.

Did you uninstall the imagemagick module?
Delete the old module
Clear database cache gallery admin -> maintenance -> clear database cache
Upload my module
install my module
test my module -> save
Toolkit priority move IM to top

test upload

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
linyi1982

Joined: 2010-01-22
Posts: 13
Posted: Sun, 2010-01-24 05:58

Thank you very much to suprsidr.I get it.And when upload .rgb file ,it work perfect now.
Can you tell me how do you enable the imageMagick modul to support .rgb file and the changes in your imageMagic modul.
I try to modify it myself before you send me your modul.I modify the $mimeType var value to image/x-rgb in GalleryDerivativeImage.class file in line 162.After that there is no error.But the trumbnail is not correct.
I what to know how do you modify it to enable imageMagick modul support a new file type,just like when test the modul ,the image/x-rgb mime type is add to the list.