Behaviour of Mathematica varies according to size of digital image imported
- To: mathgroup at smc.vnet.net
- Subject: [mg80588] Behaviour of Mathematica varies according to size of digital image imported
- From: Mac <mwjdavidson at googlemail.com>
- Date: Sun, 26 Aug 2007 04:29:53 -0400 (EDT)
I'm using "Import" to read a stack of digital images into a list in order to create an animation. However, the way Mathematica treats my list depends on the size of the image - a strange behaviour which I don't understand. The following is an example: Case1: Using png or jpeg files with image size 96 x 256 (height, width) (* files is a list of the filenames to import - 10 images in my case*) In[216]:= Clear[imglist] imglist = Import[#] & /@ files ; Dimensions[imglist[[All, 1, 1]]] Out[218]={10, 96, 256, 3} Case 2: Using png or jpeg files of any other width. I've tried images of width 512, 257,255. Whenever the width is not 256 they all give the same result In[216]:= Clear[imglist] imglist = Import[#] & /@ files ; Dimensions[imglist[[All, 1, 1]]] Out[218]= {10} which is a real problem as I interpolate between the different images to get a smoother animation. I've tried all sorts of tricks to get around case 2 and get a list of image data as in case1 (using Apply, Graphics-> List rules etc...) to no avail. I'm using the latest Mathematica 6.0.1 and Windows XP SP2 I would be grateful for any help. It has taken me a better part of a day to track down the problem.