Tag Info

New answers tagged

2

For variety, one can do this with ControllerManipulate imgs = Plot[Sin[x + #], {x, 0, 2 Pi}] & /@ Range[0, 2 Pi, Pi/10]; ControllerManipulate[ Show[imgs[[(Pause[0.05]; 1 + Mod[x++, Length@imgs - 0])]]], {x, 0, 1}]


1

I haven't carefully looked over the makeAnimation that is suggested in the comments but it looks like it might be even be more advanced than what you need, it certainly is more advanced that what I had written so here goes a basic version that might help you: animation[frames_, delay_] := Module[{fr = frames}, Dynamic[ Refresh[First[fr = ...


3

I wish to expand the answer by Simon Woods according to my current understanding. The key point is that a BMP file normally does not contain a 2D array of RGB triplets but instead it contains a color table which lists all unique RGB triplets used in the image and assigns to each of them an index. The 2D array encoding the image contains only indices of ...


4

You can obtain an 8-bit BMP by converting the image to an 8-bit representation: Export["test.bmp", Image[image, "Byte"]] Note that Import["test.bmp","ColorSpace"] will still return RGBColor, because an 8-bit BMP is still in the RGB color space (there is a color table which specifies an RGB color for each of the 256 possible pixel values - while it is very ...


4

I was able to isolate the problem with BarLegend in v.10.0.0. Yes, it is clearly a bug. Let us see the how the thin grey lines are implemented: Cases[ ToBoxes[BarLegend[{"DeepSeaColors", {0, 1}}, LegendLayout -> "ReversedColumn"]], _LineBox, Infinity] {LineBox[ NCache[{{-(15/2), 225/2}, {15/2, 225/2}, {15/ 2, -(225/2)}, {-(15/2), ...


6

Using Simon Woods' shadow package this is easy: text = Style[HoldForm@Sum[x^2, {x, 0, 10}], 100, Bold]; image = ImageResize[Import["http://creativity103.com/collections/Graphic/rainbowbars.jpg"], ImageDimensions@Rasterize@text]; shadow[image, text] In the example above I stretched the background to fit the image of the equation. If you want to tile the ...


17

Here's a method based on creating a MeshRegion from the text: text = Style[HoldForm @ Sum[x^2, {x, 0, 10}], 100, Bold]; graphics = First[text ~ExportString~ "PDF" ~ImportString~ "PDF"]; region = DiscretizeGraphics[graphics, MaxCellMeasure -> 5]; image = ExampleData[{"ColorTexture", "Kingwood"}]; RegionPlot[region, Frame -> False, ...


9

ImageAdd is your friend: image = Import["http://creativity103.com/collections/Graphic/rainbowbars.jpg"]; text = HoldForm @ Sum[x^2, {x, 0, 10}]; img2 = Image @ Rasterize @ Style[text, 100, Bold]; rainbow = image ~ImageResize~ ImageDimensions[img2] ~ImageAdd~ img2 With Pickett's extension for outlining: img3 = ColorNegate[img2] ~Dilation~ 2 // ...


2

Try constraining the execution time to something reasonable TimeConstrained[Import[filename, "Elements"], 1] this will abort the Import function after 1 second allowing you to skip the offending files. A list of non-offending files can be obtained with this: filelist = Select[FileNames["*.*"], (Length@TimeConstrained[Import[#, "Elements"], 1] > 0) ...



Top 50 recent answers are included