Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
66d3431
basic support for images (python 3 version)
l1ebl Apr 27, 2016
7a62925
work in progress: basic Image[] functionality
l1ebl Apr 28, 2016
fdfc2a5
some morphology functions; inout.py fix
l1ebl Apr 28, 2016
02e73e4
min, max, median filters
l1ebl Apr 28, 2016
5a885ac
Colorize
l1ebl Apr 29, 2016
ebc2f0d
cleanup
l1ebl Apr 29, 2016
1c48b56
PixelValuePositions
l1ebl Apr 29, 2016
dd99731
import and export for multiple formats, some image method tuning
l1ebl Apr 29, 2016
6fd6406
added image module to builtin module's init
l1ebl Apr 29, 2016
ab4032c
a bit of python2 compatibility
l1ebl Apr 29, 2016
3f81a6d
some comments in the file head
l1ebl Apr 29, 2016
618abd1
fixed encoding logic for python2/3
l1ebl Apr 29, 2016
a90e6b2
implement arbitrary arg Image arithmetic
sn6uv May 1, 2016
6d88929
Image arithmetic docs and tests
sn6uv May 1, 2016
f1aeb53
wrap image in <mtext> (within <math>) to allow images within expressions
sn6uv May 1, 2016
da73561
tests and docs for RandomImage
sn6uv May 4, 2016
38f5fe7
image import examples
sn6uv May 4, 2016
8e011d2
(failing) multiplicative and additive noise examples
sn6uv May 4, 2016
c8ef3c5
remove duplicate jpeg import/exporters
sn6uv May 4, 2016
48ef0ee
fixup image tests
sn6uv May 4, 2016
c3b514c
pep8 cleanups
sn6uv May 4, 2016
25cef78
cleanup ImageResize
sn6uv May 4, 2016
5635d1c
fix ImageResize option bug and Gaussian resize rounding bug
sn6uv May 4, 2016
0b9c5cf
fix Gaussian sampling aspect ratio message
sn6uv May 4, 2016
21c9d26
cleanup morphology filters
sn6uv May 4, 2016
8515878
morphology docs
sn6uv May 4, 2016
db970d4
cleanup image arith functions
sn6uv May 4, 2016
d887968
only import image module when enabled
sn6uv May 4, 2016
79937d3
only test for the minimum import/export formats supported
sn6uv May 4, 2016
c82d503
move image tests to image module
sn6uv May 4, 2016
7844b20
cleanp image arith
sn6uv May 4, 2016
544223a
RandomImage RGB colorspace
sn6uv May 5, 2016
2da6e3a
a much more robust implementation for Colorize[]
l1ebl May 10, 2016
6441aa3
ImageCreate[] now checks if pixel dimensions are ok
l1ebl May 10, 2016
980317c
implement ImageReflect full spec
sn6uv May 15, 2016
cb8696c
ImageRotate docs
sn6uv May 15, 2016
5a8fc42
remove Image.to_sympy (see what breaks)
sn6uv May 15, 2016
aa41314
ImagePartition docs and tweak
sn6uv May 21, 2016
c73dfb5
ImageAdjust
sn6uv May 21, 2016
a8c8ef4
removed ImageCreate[] in favour of Image[] alone. adds width and heig…
l1ebl May 24, 2016
61e16cf
adds support for classic Mathics branch
l1ebl May 24, 2016
9decfeb
adds ImageQ
l1ebl May 24, 2016
6e5c4b3
changed ImageQ to Test, fixed BinaryImageQ (was Test, but did not def…
l1ebl May 25, 2016
0ce4784
one more test case for ImageQ
l1ebl May 25, 2016
1616ce0
image cleanup after rebase
lieblb Aug 17, 2016
7bdfc0c
added scipy to requirements as it's currently needed; will be remedie…
l1ebl Aug 17, 2016
b67c7ed
changed output to mglyph, added simple WordCloud
l1ebl Aug 17, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions mathics/autoload/formats/Image/Export.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
(* Image Exporter *)

Begin["System`Convert`Image`"]

RegisterImageExport[type_] := RegisterExport[
type,
System`ImageExport,
Options -> {},
BinaryFormat -> True
];

RegisterImageExport[#]& /@ {"BMP", "GIF", "JPEG2000", "JPEG", "PCX", "PNG", "PPM", "PBM", "PGM", "TIFF"};

End[]
16 changes: 16 additions & 0 deletions mathics/autoload/formats/Image/Import.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(* Image Importer *)

Begin["System`Convert`Image`"]

RegisterImageImport[type_] := RegisterImport[
type,
System`ImageImport,
{},
AvailableElements -> {"Image"},
DefaultElement -> "Image",
FunctionChannels -> {"FileNames"}
];

RegisterImageImport[#]& /@ {"BMP", "GIF", "JPEG2000", "JPEG", "PCX", "PNG", "PPM", "PBM", "PGM", "TIFF", "ICO", "TGA"};

End[]
4 changes: 2 additions & 2 deletions mathics/builtin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from mathics.builtin import (
algebra, arithmetic, assignment, attributes, calculus, combinatorial,
comparison, control, datentime, diffeqns, evaluation, exptrig, functional,
graphics, graphics3d, inout, integer, linalg, lists, logic, numbertheory,
graphics, graphics3d, image, inout, integer, linalg, lists, logic, numbertheory,
numeric, options, patterns, plot, physchemdata, randomnumbers, recurrence,
specialfunctions, scoping, strings, structure, system, tensors)

Expand All @@ -19,7 +19,7 @@
modules = [
algebra, arithmetic, assignment, attributes, calculus, combinatorial,
comparison, control, datentime, diffeqns, evaluation, exptrig, functional,
graphics, graphics3d, inout, integer, linalg, lists, logic, numbertheory,
graphics, graphics3d, image, inout, integer, linalg, lists, logic, numbertheory,
numeric, options, patterns, plot, physchemdata, randomnumbers, recurrence,
specialfunctions, scoping, strings, structure, system, tensors]

Expand Down
4 changes: 3 additions & 1 deletion mathics/builtin/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,13 @@ def contextify_form_name(f):
makeboxes_def.add_rule(rule)

@classmethod
def get_name(cls):
def get_name(cls, short=False):
if cls.name is None:
shortname = cls.__name__
else:
shortname = cls.name
if short:
return shortname
return cls.context + shortname

def get_operator(self):
Expand Down
Loading