rmagick 2.3.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rmagick might be problematic. Click here for more details.

data/ext/RMagick/rminfo.c CHANGED
@@ -1,4 +1,4 @@
1
- /* $Id: rminfo.c,v 1.70 2008/01/02 15:52:19 rmagick Exp $ */
1
+ /* $Id: rminfo.c,v 1.71 2008/05/21 22:32:41 rmagick Exp $ */
2
2
  /*============================================================================\
3
3
  | Copyright (C) 2008 by Timothy P. Hunter
4
4
  | Name: rminfo.c
@@ -235,7 +235,7 @@ Info_aset(int argc, VALUE *argv, VALUE self)
235
235
  {
236
236
  Info *info;
237
237
  volatile VALUE value;
238
- char *format_p, *key_p, *value_p = "";
238
+ char *format_p, *key_p, *value_p = NULL;
239
239
  long format_l, key_l;
240
240
  char ckey[MaxTextExtent];
241
241
  unsigned int okay;
@@ -528,7 +528,8 @@ VALUE
528
528
  Info_define(int argc, VALUE *argv, VALUE self)
529
529
  {
530
530
  Info *info;
531
- char *format, *key, *value = "";
531
+ char *format, *key;
532
+ const char *value = "";
532
533
  long format_l, key_l;
533
534
  char ckey[100];
534
535
  unsigned int okay;
@@ -541,7 +542,7 @@ Info_define(int argc, VALUE *argv, VALUE self)
541
542
  case 3:
542
543
  /* Allow any argument that supports to_s */
543
544
  fmt_arg = rb_funcall(argv[2], rm_ID_to_s, 0);
544
- value = StringValuePtr(fmt_arg);
545
+ value = (const char *)StringValuePtr(fmt_arg);
545
546
  case 2:
546
547
  key = rm_str2cstr(argv[1], &key_l);
547
548
  format = rm_str2cstr(argv[0], &format_l);
@@ -720,8 +721,8 @@ Info_depth_eq(VALUE self, VALUE depth)
720
721
  */
721
722
  static struct
722
723
  {
723
- char *string;
724
- char *enum_name;
724
+ const char *string;
725
+ const char *enum_name;
725
726
  DisposeType enumerator;
726
727
  } Dispose_Option[] = {
727
728
  { "Background", "BackgroundDispose", BackgroundDispose},
@@ -774,7 +775,7 @@ Info_dispose_eq(VALUE self, VALUE disp)
774
775
  {
775
776
  Info *info;
776
777
  DisposeType dispose;
777
- char *option;
778
+ const char *option;
778
779
  int x;
779
780
 
780
781
  Data_Get_Struct(self, Info, info);
@@ -1006,8 +1007,8 @@ VALUE Info_fuzz_eq(VALUE self, VALUE fuzz)
1006
1007
 
1007
1008
  static struct
1008
1009
  {
1009
- char *string;
1010
- char *enum_name;
1010
+ const char *string;
1011
+ const char *enum_name;
1011
1012
  GravityType enumerator;
1012
1013
  } Gravity_Option[] = {
1013
1014
  { "Undefined", "UndefinedGravity", UndefinedGravity},
@@ -1064,7 +1065,7 @@ Info_gravity_eq(VALUE self, VALUE grav)
1064
1065
  {
1065
1066
  Info *info;
1066
1067
  GravityType gravity;
1067
- char *option;
1068
+ const char *option;
1068
1069
  int x;
1069
1070
 
1070
1071
  Data_Get_Struct(self, Info, info);
@@ -1742,7 +1743,7 @@ Info_alloc(VALUE class)
1742
1743
  Notes: takes no parameters, but runs the parm block if present
1743
1744
  */
1744
1745
  VALUE
1745
- rm_info_new()
1746
+ rm_info_new(void)
1746
1747
  {
1747
1748
  volatile VALUE info_obj;
1748
1749
 
data/ext/RMagick/rmmain.c CHANGED
@@ -1,4 +1,4 @@
1
- /* $Id: rmmain.c,v 1.247 2008/03/29 15:23:12 rmagick Exp $ */
1
+ /* $Id: rmmain.c,v 1.250 2008/06/02 22:47:37 rmagick Exp $ */
2
2
  /*============================================================================\
3
3
  | Copyright (C) 2008 by Timothy P. Hunter
4
4
  | Name: rmmain.c
@@ -88,7 +88,7 @@ Magick_fonts(VALUE class)
88
88
  {
89
89
  for (x = 0; x < number_types; x++)
90
90
  {
91
- (void) rb_yield(Font_from_TypeInfo((TypeInfo *)type_info[x]));
91
+ (void) rb_yield(Font_from_TypeInfo((const TypeInfo *)type_info[x]));
92
92
  }
93
93
  magick_free((void *)type_info);
94
94
  return class;
@@ -98,7 +98,7 @@ Magick_fonts(VALUE class)
98
98
  ary = rb_ary_new2((long)number_types);
99
99
  for (x = 0; x < number_types; x++)
100
100
  {
101
- (void) rb_ary_push(ary, Font_from_TypeInfo((TypeInfo *)type_info[x]));
101
+ (void) rb_ary_push(ary, Font_from_TypeInfo((const TypeInfo *)type_info[x]));
102
102
  }
103
103
  magick_free((void *)type_info);
104
104
  return ary;
@@ -123,7 +123,7 @@ Magick_fonts(VALUE class)
123
123
  There are 3 implementations.
124
124
  */
125
125
 
126
- static VALUE MagickInfo_to_format(MagickInfo *magick_info)
126
+ static VALUE MagickInfo_to_format(const MagickInfo *magick_info)
127
127
  {
128
128
  char mode[4];
129
129
 
@@ -157,7 +157,7 @@ Magick_init_formats(VALUE class)
157
157
  {
158
158
  (void) rb_hash_aset(formats
159
159
  , rb_str_new2(magick_info[x]->name)
160
- , MagickInfo_to_format((MagickInfo *)magick_info[x]));
160
+ , MagickInfo_to_format((const MagickInfo *)magick_info[x]));
161
161
  }
162
162
  return formats;
163
163
  }
@@ -249,7 +249,7 @@ Magick_limit_resource(int argc, VALUE *argv, VALUE class)
249
249
 
250
250
  if (argc > 1)
251
251
  {
252
- (void) SetMagickResourceLimit(res, NUM2ULONG(limit));
252
+ (void) SetMagickResourceLimit(res, (MagickSizeType)NUM2ULONG(limit));
253
253
  }
254
254
 
255
255
  return ULONG2NUM(cur_limit);
@@ -268,8 +268,8 @@ static VALUE
268
268
  Magick_set_cache_threshold(VALUE class, VALUE threshold)
269
269
  {
270
270
  unsigned long thrshld = NUM2ULONG(threshold);
271
- (void) SetMagickResourceLimit(MemoryResource,thrshld);
272
- (void) SetMagickResourceLimit(MapResource,2*thrshld);
271
+ (void) SetMagickResourceLimit(MemoryResource, (MagickSizeType)thrshld);
272
+ (void) SetMagickResourceLimit(MapResource, (MagickSizeType)(2*thrshld));
273
273
  return class;
274
274
  }
275
275
 
@@ -434,7 +434,7 @@ Init_RMagick2(void)
434
434
  DCL_ATTR_ACCESSOR(Image, gamma)
435
435
  DCL_ATTR_ACCESSOR(Image, geometry)
436
436
  DCL_ATTR_ACCESSOR(Image, gravity)
437
- DCL_ATTR_READER(Image, image_type)
437
+ DCL_ATTR_ACCESSOR(Image, image_type)
438
438
  DCL_ATTR_ACCESSOR(Image, interlace)
439
439
  DCL_ATTR_ACCESSOR(Image, iptc_profile)
440
440
  DCL_ATTR_ACCESSOR(Image, iterations) // do not document! Only used by Image#iterations=
@@ -782,7 +782,8 @@ Init_RMagick2(void)
782
782
  // include Comparable
783
783
  rb_include_module(Class_Pixel, rb_mComparable);
784
784
 
785
- // Magick::Pixel has 3 constructors: "new" "from_color", and "from_HSL".
785
+ // Magick::Pixel has 4 constructors: "new" "from_color", "from_hsla",
786
+ // and the deprecated "from_HSL".
786
787
  rb_define_alloc_func(Class_Pixel, Pixel_alloc);
787
788
  rb_define_singleton_method(Class_Pixel, "from_color", Pixel_from_color, 1);
788
789
  rb_define_singleton_method(Class_Pixel, "from_HSL", Pixel_from_HSL, 1);
@@ -813,7 +814,7 @@ Init_RMagick2(void)
813
814
  rb_define_method(Class_Pixel, "hash", Pixel_hash, 0);
814
815
  rb_define_method(Class_Pixel, "intensity", Pixel_intensity, 0);
815
816
  rb_define_method(Class_Pixel, "to_color", Pixel_to_color, -1);
816
- rb_define_method(Class_Pixel, "to_HSL", Pixel_to_HSL, 0);
817
+ rb_define_method(Class_Pixel, "to_HSL", Pixel_to_HSL, 0); // deprecated
817
818
  rb_define_method(Class_Pixel, "to_hsla", Pixel_to_hsla, 0);
818
819
  rb_define_method(Class_Pixel, "to_s", Pixel_to_s, 0);
819
820
 
@@ -1707,7 +1708,7 @@ static void version_constants(void)
1707
1708
  rb_define_const(Module_Magick, "Version", str);
1708
1709
 
1709
1710
  sprintf(long_version,
1710
- "This is %s ($Date: 2008/03/29 15:23:12 $) Copyright (C) 2008 by Timothy P. Hunter\n"
1711
+ "This is %s ($Date: 2008/06/02 22:47:37 $) Copyright (C) 2008 by Timothy P. Hunter\n"
1711
1712
  "Built with %s\n"
1712
1713
  "Built for %s\n"
1713
1714
  "Web page: http://rmagick.rubyforge.org\n"
data/ext/RMagick/rmutil.c CHANGED
@@ -1,4 +1,4 @@
1
- /* $Id: rmutil.c,v 1.153 2008/03/29 15:19:15 rmagick Exp $ */
1
+ /* $Id: rmutil.c,v 1.155 2008/05/21 22:32:41 rmagick Exp $ */
2
2
  /*============================================================================\
3
3
  | Copyright (C) 2008 by Timothy P. Hunter
4
4
  | Name: rmutil.c
@@ -16,7 +16,7 @@ static void Color_Name_to_PixelPacket(PixelPacket *, VALUE);
16
16
  static VALUE Enum_type_values(VALUE);
17
17
  static VALUE Enum_type_inspect(VALUE);
18
18
  static void handle_exception(ExceptionInfo *, Image *, ErrorRetention);
19
- static VALUE Pixel_from_MagickPixelPacket(MagickPixelPacket *);
19
+ static VALUE Pixel_from_MagickPixelPacket(const MagickPixelPacket *);
20
20
 
21
21
  #define ENUMERATORS_CLASS_VAR "@@enumerators"
22
22
 
@@ -577,13 +577,13 @@ Pixel_from_color(VALUE class, VALUE name)
577
577
  Notes: Same code as the private function SetMagickPixelPacket
578
578
  in ImageMagick.
579
579
  */
580
- static void rm_set_magick_pixel_packet(Pixel *pixel, IndexPacket *index, MagickPixelPacket *pp)
580
+ static void rm_set_magick_pixel_packet(Pixel *pixel, IndexPacket *index_packet, MagickPixelPacket *pp)
581
581
  {
582
582
  pp->red = (MagickRealType) pixel->red;
583
583
  pp->green = (MagickRealType) pixel->green;
584
584
  pp->blue = (MagickRealType) pixel->blue;
585
585
  pp->opacity = (MagickRealType) (pp->matte ? pixel->opacity : OpaqueOpacity);
586
- pp->index = (MagickRealType) ((pp->colorspace == CMYKColorspace) && (index ? *index : 0));
586
+ pp->index = (MagickRealType) ((pp->colorspace == CMYKColorspace) && (index_packet ? *index_packet : 0));
587
587
  }
588
588
 
589
589
 
@@ -1741,7 +1741,7 @@ GravityType_new(GravityType type)
1741
1741
  Static: ImageType_name
1742
1742
  Purpose: Return the name of a ImageType enum as a string
1743
1743
  */
1744
- static char *
1744
+ static const char *
1745
1745
  ImageType_name(ImageType type)
1746
1746
  {
1747
1747
  switch(type)
@@ -2026,7 +2026,7 @@ Color_from_ColorInfo(const ColorInfo *ci)
2026
2026
 
2027
2027
  compliance_type = ci->compliance;
2028
2028
  compliance = ComplianceType_new(compliance_type);
2029
- color = Pixel_from_MagickPixelPacket((MagickPixelPacket *)(&(ci->color)));
2029
+ color = Pixel_from_MagickPixelPacket(&(ci->color));
2030
2030
 
2031
2031
  return rb_funcall(Class_Color, rm_ID_new, 3
2032
2032
  , name, compliance, color);
@@ -2121,7 +2121,7 @@ Color_to_s(VALUE self)
2121
2121
  Notes: bypasses normal Pixel.new, Pixel#initialize methods
2122
2122
  */
2123
2123
  VALUE
2124
- Pixel_from_PixelPacket(PixelPacket *pp)
2124
+ Pixel_from_PixelPacket(const PixelPacket *pp)
2125
2125
  {
2126
2126
  Pixel *pixel;
2127
2127
 
@@ -2137,7 +2137,7 @@ Pixel_from_PixelPacket(PixelPacket *pp)
2137
2137
  Notes: bypasses normal Pixel.new, Pixel#initialize methods
2138
2138
  */
2139
2139
  static VALUE
2140
- Pixel_from_MagickPixelPacket(MagickPixelPacket *pp)
2140
+ Pixel_from_MagickPixelPacket(const MagickPixelPacket *pp)
2141
2141
  {
2142
2142
  Pixel *pixel;
2143
2143
 
@@ -2204,10 +2204,10 @@ Color_to_MagickPixelPacket(Image *image, MagickPixelPacket *mpp, VALUE color)
2204
2204
 
2205
2205
  memset(&pp, '\0', sizeof(pp));
2206
2206
  Color_to_PixelPacket(&pp, color);
2207
- mpp->red = pp.red;
2208
- mpp->green = pp.green;
2209
- mpp->blue = pp.blue;
2210
- mpp->opacity = pp.opacity;
2207
+ mpp->red = (MagickRealType) pp.red;
2208
+ mpp->green = (MagickRealType) pp.green;
2209
+ mpp->blue = (MagickRealType) pp.blue;
2210
+ mpp->opacity = (MagickRealType) pp.opacity;
2211
2211
  }
2212
2212
 
2213
2213
 
@@ -2475,7 +2475,7 @@ StyleType_new(StyleType style)
2475
2475
  Purpose: Convert a TypeInfo structure to a Magick::Font
2476
2476
  */
2477
2477
  VALUE
2478
- Font_from_TypeInfo(TypeInfo *ti)
2478
+ Font_from_TypeInfo(const TypeInfo *ti)
2479
2479
  {
2480
2480
  volatile VALUE name, description, family;
2481
2481
  volatile VALUE style, stretch, weight;
@@ -2754,7 +2754,7 @@ VirtualPixelMethod_new(VirtualPixelMethod style)
2754
2754
  * Extern: rm_define_enum_type
2755
2755
  * Purpose: set up a subclass of Enum
2756
2756
  */
2757
- VALUE rm_define_enum_type(char *tag)
2757
+ VALUE rm_define_enum_type(const char *tag)
2758
2758
  {
2759
2759
  VALUE class;
2760
2760
 
@@ -2892,12 +2892,12 @@ VALUE Enum_case_eq(VALUE self, VALUE other)
2892
2892
  */
2893
2893
  VALUE Enum_type_initialize(VALUE self, VALUE sym, VALUE val)
2894
2894
  {
2895
- volatile VALUE super_argv[2];
2895
+ VALUE super_argv[2];
2896
2896
  volatile VALUE enumerators;
2897
2897
 
2898
2898
  super_argv[0] = sym;
2899
2899
  super_argv[1] = val;
2900
- (void) rb_call_super(2, (VALUE *)super_argv);
2900
+ (void) rb_call_super(2, (const VALUE *)super_argv);
2901
2901
 
2902
2902
  if (rb_cvar_defined(CLASS_OF(self), rb_intern(ENUMERATORS_CLASS_VAR)) != Qtrue)
2903
2903
  {
@@ -3078,11 +3078,11 @@ StyleType_name(StyleType style)
3078
3078
  External: write_temp_image
3079
3079
  Purpose: Write a temporary copy of the image to the IM registry
3080
3080
  Returns: the "filename" of the registered image
3081
- Notes: The `tmpnam' argument must point to an char array
3081
+ Notes: The `temp_name' argument must point to an char array
3082
3082
  of size MaxTextExtent.
3083
3083
  */
3084
3084
  void
3085
- rm_write_temp_image(Image *image, char *tmpnam)
3085
+ rm_write_temp_image(Image *image, char *temp_name)
3086
3086
  {
3087
3087
 
3088
3088
  #if defined(HAVE_SETIMAGEREGISTRY)
@@ -3110,10 +3110,10 @@ rm_write_temp_image(Image *image, char *tmpnam)
3110
3110
 
3111
3111
  id += 1;
3112
3112
  rb_cv_set(Module_Magick, TMPNAM_CLASS_VAR, INT2FIX(id));
3113
- sprintf(tmpnam, "mpri:%d", id);
3113
+ sprintf(temp_name, "mpri:%d", id);
3114
3114
 
3115
3115
  // Omit "mpri:" from filename to form the key
3116
- okay = SetImageRegistry(ImageRegistryType, tmpnam+5, image, &exception);
3116
+ okay = SetImageRegistry(ImageRegistryType, temp_name+5, image, &exception);
3117
3117
  CHECK_EXCEPTION()
3118
3118
  DestroyExceptionInfo(&exception);
3119
3119
  if (!okay)
@@ -3136,7 +3136,7 @@ rm_write_temp_image(Image *image, char *tmpnam)
3136
3136
  rb_raise(rb_eRuntimeError, "SetMagickRegistry failed.");
3137
3137
  }
3138
3138
 
3139
- sprintf(tmpnam, "mpri:%ld", registry_id);
3139
+ sprintf(temp_name, "mpri:%ld", registry_id);
3140
3140
  #endif
3141
3141
 
3142
3142
  }
@@ -3148,19 +3148,19 @@ rm_write_temp_image(Image *image, char *tmpnam)
3148
3148
  */
3149
3149
 
3150
3150
  void
3151
- rm_delete_temp_image(char *tmpnam)
3151
+ rm_delete_temp_image(char *temp_name)
3152
3152
  {
3153
3153
  #if defined(HAVE_SETIMAGEREGISTRY)
3154
- MagickBooleanType okay = DeleteImageRegistry(tmpnam+5);
3154
+ MagickBooleanType okay = DeleteImageRegistry(temp_name+5);
3155
3155
 
3156
3156
  if (!okay)
3157
3157
  {
3158
- rb_warn("DeleteImageRegistry failed for `%s'", tmpnam);
3158
+ rb_warn("DeleteImageRegistry failed for `%s'", temp_name);
3159
3159
  }
3160
3160
  #else
3161
3161
  long registry_id = -1;
3162
3162
 
3163
- sscanf(tmpnam, "mpri:%ld", &registry_id);
3163
+ sscanf(temp_name, "mpri:%ld", &registry_id);
3164
3164
  if (registry_id >= 0)
3165
3165
  {
3166
3166
  (void) DeleteMagickRegistry(registry_id);
@@ -3211,7 +3211,7 @@ rm_magick_error(const char *msg, const char *loc)
3211
3211
  VALUE
3212
3212
  ImageMagickError_initialize(int argc, VALUE *argv, VALUE self)
3213
3213
  {
3214
- volatile VALUE super_argv[1] = {(VALUE)0};
3214
+ VALUE super_argv[1] = {(VALUE)0};
3215
3215
  int super_argc = 0;
3216
3216
  volatile VALUE extra = Qnil;
3217
3217
 
@@ -3228,7 +3228,7 @@ ImageMagickError_initialize(int argc, VALUE *argv, VALUE self)
3228
3228
  rb_raise(rb_eArgError, "wrong number of arguments (%d for 0 to 2)", argc);
3229
3229
  }
3230
3230
 
3231
- (void) rb_call_super(super_argc, (VALUE *)super_argv);
3231
+ (void) rb_call_super(super_argc, (const VALUE *)super_argv);
3232
3232
  (void) rb_iv_set(self, "@"MAGICK_LOC, extra);
3233
3233
 
3234
3234
 
data/lib/RMagick.rb CHANGED
@@ -1,4 +1,4 @@
1
- # $Id: RMagick.rb,v 1.67 2008/03/14 23:02:02 rmagick Exp $
1
+ # $Id: RMagick.rb,v 1.69 2008/06/02 22:46:51 rmagick Exp $
2
2
  #==============================================================================
3
3
  # Copyright (C) 2008 by Timothy P. Hunter
4
4
  # Name: RMagick.rb
@@ -917,7 +917,7 @@ class Image
917
917
  # Force an image to exact dimensions without changing the aspect ratio.
918
918
  # Resize and crop if necessary. (Thanks to Jerett Taylor!)
919
919
  def resize_to_fill(ncols, nrows=nil, gravity=CenterGravity)
920
- copy.crop_resized!(ncols, nrows, gravity)
920
+ copy.resize_to_fill!(ncols, nrows, gravity)
921
921
  end
922
922
 
923
923
  def resize_to_fill!(ncols, nrows=nil, gravity=CenterGravity)
@@ -1381,7 +1381,7 @@ public
1381
1381
  end
1382
1382
 
1383
1383
  [:at, :each, :each_index, :empty?, :fetch,
1384
- :first, :include?, :index, :length, :nitems, :rindex, :sort!].each do |mth|
1384
+ :first, :hash, :include?, :index, :length, :nitems, :rindex, :sort!].each do |mth|
1385
1385
  module_eval <<-END_SIMPLE_DELEGATES
1386
1386
  def #{mth}(*args, &block)
1387
1387
  @images.#{mth}(*args, &block)
data/rmagick.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'date'
2
2
  Gem::Specification.new do |s|
3
3
  s.name = %q{rmagick}
4
- s.version = "2.3.0"
4
+ s.version = "2.4.0"
5
5
  s.date = Date.today.to_s
6
6
  s.summary = %q{Ruby binding to ImageMagick}
7
7
  s.description = %q{RMagick is an interface between Ruby and ImageMagick.}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rmagick
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Hunter
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-03-29 00:00:00 -04:00
12
+ date: 2008-06-02 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -49,7 +49,6 @@ files:
49
49
  - lib/rvg/misc.rb
50
50
  - lib/RMagick.rb
51
51
  - setup.rb
52
- - README.txt
53
52
  - examples
54
53
  - examples/spinner.rb
55
54
  - examples/image_opacity.rb
data/README.txt DELETED
@@ -1,245 +0,0 @@
1
- RMagick 2.3.0 README
2
- ================================
3
- 03/29/08
4
- --------
5
-
6
- Table Of Contents
7
- -----------------
8
-
9
- * [Introduction] [intro]
10
- * [Contact Information] [contact]
11
- * [What's new?] [new]
12
- * [Prerequisites] [prereq]
13
- * [Installing RMagick] [install]
14
- + [Configuration options] [options]
15
- * [Things that can go wrong] [uhoh]
16
- * [Upgrading] [upgrade]
17
- * [Uninstalling] [uninstall]
18
- * [More samples] [samples]
19
- * [Known issues] [issues]
20
- * [Reporting bugs] [bugs]
21
- * [Credits] [credits]
22
- * [License] [license]
23
-
24
- <h2 id="intro">Introduction</h2>
25
-
26
- RMagick is an interface between the Ruby programming language and the
27
- ImageMagick image processing library.
28
-
29
- <h2 id="contact">Contact Information</h2>
30
-
31
- __Author:__ Tim Hunter
32
-
33
- __Email:__ <rmagick@rubyforge.org>
34
-
35
- __RubyForge:__ <http://rubyforge.org/projects/rmagick/>
36
-
37
- <h2 id="new">What's new?</h2>
38
- RMagick 2.0.0 incorporates all changes and bug fixes from RMagick 1.15.13.
39
- See the ChangeLog for additional changes and bug fixes in later releases.
40
-
41
- <h2 id="prereq">Prerequisites</h2>
42
-
43
- __O/S:__ Linux, Sun Solaris, Cygwin, FreeBSD, OS X.
44
-
45
- __Ruby__ 1.8.2 or later. You can get Ruby from <http://www.ruby-lang.org>.
46
- The use of versions of Ruby older than 1.8.4 is deprecated and may be
47
- removed in a future release.
48
-
49
- __ImageMagick__ 6.3.0 or later. You can get ImageMagick from
50
- <http://www.imagemagick.org>.
51
-
52
- <h2 id="install">Installation</h2>
53
-
54
- Before installing RMagick, you must install ImageMagick.
55
- Complete and up-to-date instructions for installing ImageMagick on Linux,
56
- *BSD, and other *nix-type O/S's are available
57
- at <http://rmagick.rubyforge.org/install-linux.html>, steps 0, 1, 2.
58
- Similarly, instructions for installing ImageMagick using MacPorts
59
- on OS X are available at <http://rmagick.rubyforge.org/install-osx.html>,
60
- steps 1 and 2. After installing
61
- ImageMagick, use the instructions in the next section to install RMagick.
62
-
63
- <h2 id="install">Installing RMagick 2.3.0</h2>
64
-
65
- This release of RMagick uses Minero Aoki's setup.rb script for installation.
66
- See the next section for configuration options. Usually you do not need to
67
- specify any of these options. You can get more information about setup.rb from
68
- his web site <http://i.loveruby.net>
69
-
70
- I assume you've already decompressed the tarball, or you wouldn't be reading
71
- this. If you have not decompressed the tarball, do so with one of these commands,
72
- depending on which tarball you have:
73
-
74
- tar xvzf RMagick-2.3.0-tar.gz (gzipped tarball)
75
- tar xvjf RMagick-2.3.0-tar.bz2 (bzipped tarball)
76
- 7z e RMagick-x.y.z.tar.lzma -so | tar xv (7zipped tarball)
77
-
78
- Change to the RMagick-2.3.0 directory. If you are not using any
79
- configuration options (usually you don't need to) enter the command
80
-
81
- ruby setup.rb
82
-
83
- Note that setup.rb executes all the example programs, so this can take
84
- some time. This process both builds the example images used in the
85
- documentation and validates your RMagick installation.
86
-
87
- After this command completes, make sure you have root priviledges (that
88
- is, login as root or use su or sudo) and enter the command
89
-
90
- ruby setup.rb install
91
-
92
- <h4 id="options">Configuration Options</h4>
93
-
94
- Type `ruby setup.rb --help` to see a list of configuration options. In
95
- addition to the regular options, there are a few RMagick-specific options:
96
-
97
- * --doc-dir=_directory_
98
- > Specify the directory to install the RMagick documentation.
99
- > By default this is $prefix/share/RMagick, where $prefix is the
100
- > prefix specified by --prefix. For example, to install the
101
- > documentation in /Users/me/RMagick, specify:
102
-
103
- > `./configure --doc-dir=/Users/me/RMagick`
104
-
105
- * --allow-example-errors
106
- > Normally the documentation installation terminates if 5 examples fail.
107
- > If you use this option, the installation does not check for failing
108
- > examples and will always complete. This option is useful if you're
109
- > having trouble installing RMagick and you want to see all the failing examples.
110
-
111
- * --disable-htmldoc
112
- > By default the install process runs all the RMagick example programs
113
- > and generates HTML versions of all the examples. This option causes
114
- > the install process to skip this step. No install verification occurs
115
- > and no documentation is installed.
116
-
117
- <h2 id="uhoh">Things that can go wrong</h2>
118
-
119
- The RMagick installation FAQ [<http://rmagick.rubyforge.org/install-faq.html>]
120
- has answers to the most commonly reported problems.
121
-
122
- #### Can't install RMagick. Can't find libMagick or one of the dependent libraries. Check the mkmf.log file for more detailed information.
123
- Typically this message means that one or more of the libraries that ImageMagick
124
- depends on hasn't been installed. Examine the mkmf.log file in the ext/RMagick
125
- subdirectory of the installation directory for any error messages. These messages
126
- typically contain enough additional information for you to be able to diagnose
127
- the problem. Also see <http://rmagick.rubyforge.org/install-faq.html#libmagick>.
128
-
129
- #### Cannot open shared object file
130
- When make is running the examples, if you get a message like this:
131
-
132
- /home/you/RMagick-2.3.0/lib/RMagick.rb:11:in `require': libMagick.so.0:
133
- cannot open shared object file: No such file or directory -
134
- /home/you/RMagick-2.3.0/ext/RMagick/RMagick.so (LoadError)
135
-
136
- you probably do not have the directory in which the ImageMagick library
137
- is installed in your load path. An easy way to fix this is to define
138
- the directory in the LD\_LIBRARY\_PATH environment variable. For
139
- example, suppose you installed the ImageMagick library libMagick.so in
140
- /usr/local/lib. (By default this is where it is installed.) Create the
141
- LD\_LIBRARY\_PATH variable like this:
142
-
143
- export LD_LIBRARY_PATH=/usr/local/lib
144
-
145
- On Linux, see `ld(1)` and `ld.so(8)` for more information. On other operating
146
- systems, see the documentation for the dynamic loading facility.
147
-
148
- #### No such file or directory - "/tmp/rmagick6872.6"
149
- When make is running the examples, if you get a message like this:
150
-
151
- hook /home/me/src/RMagick-2.3.0/./post-setup.rb failed:
152
- No such file or directory - "/tmp/rmagick6872.6"
153
-
154
- you probably do not have a temporary directory environment variable set. Set
155
- the TMPDIR environment variable to your temporary directory. For example:
156
-
157
- export TMPDIR=/home/me/tmp
158
-
159
- <h2 id="upgrade">Upgrading</h2>
160
-
161
- If you upgrade to a newer release of ImageMagick, make sure you're using a
162
- release of RMagick that supports that release. It's safe to install a newer
163
- release of RMagick over an earlier release.
164
-
165
- <h2 id="uninstall">Uninstalling</h2>
166
-
167
- The `uninstall.rb` script will uninstall RMagick completely. Make sure you
168
- have administrator priviledges. Then run this command:
169
-
170
- ruby uninstall.rb
171
-
172
- <h2 id="samples">More samples</h2>
173
-
174
- You can find more sample RMagick programs in the /example directory.
175
- These programs are not installed in the RMagick documentation tree.
176
-
177
- <h2 id="bugs">Reporting bugs</h2>
178
-
179
- Please report bugs in RMagick, its documentation, or its installation
180
- programs to me via the bug tracker on the [RMagick project page at
181
- RubyForge](http://rubyforge.org/projects/rmagick). However, I can't help
182
- with Ruby installation and configuration or ImageMagick
183
- installation and configuration. Information about reporting problems and
184
- getting help for ImageMagick is available at the ImageMagick web site
185
- (http://www.imagemagick.org).
186
-
187
- <h2 id="credits">Credits</h2>
188
-
189
- Thanks to
190
-
191
- * ImageMagick Studio LLC, for ImageMagick and for hosting the RMagick documentation.
192
-
193
- <h2 id="license">License</h2>
194
-
195
- > Copyright � 2002-2008 by Timothy P. Hunter
196
- >
197
- > Permission is hereby granted, free of charge, to any person obtaining a
198
- > copy of this software and associated documentation files (the "Software"),
199
- > to deal in the Software without restriction, including without limitation
200
- > the rights to use, copy, modify, merge, publish, distribute, sublicense,
201
- > and/or sell copies of the Software, and to permit persons to whom the
202
- > Software is furnished to do so, subject to the following conditions:
203
- >
204
- > The above copyright notice and this permission notice shall be included in
205
- > all copies or substantial portions of the Software.
206
-
207
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
208
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
209
- > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
210
- > THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
211
- > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
212
- > FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
213
- > DEALINGS IN THE SOFTWARE.
214
-
215
-
216
- <div align="center">
217
- <a href="http://www.opensource.org/docs/definition.php">
218
- <img src="http://opensource.org/trademarks/osi-certified/web/osi-certified-90x75.gif"
219
- border="0" width="90" height="75">
220
- </a>
221
- </div>
222
-
223
- -------------------------------------------------------------------------------
224
-
225
- <em>
226
- This file is marked up using [Markdown](http://daringfireball.net/projects/markdown).
227
- The HTML version was produced with [BlueCloth](http://bluecloth.rubyforge.org).
228
- </em>
229
-
230
- [intro]: #intro
231
- [contact]: #contact
232
- [new]: #new
233
- [prereq]: #prereq
234
- [install]: #install
235
- [options]: #options
236
- [uhoh]: #uhoh
237
- [upgrade]: #upgrade
238
- [uninstall]: #uninstall
239
- [samples]: #samples
240
- [undoc]: #undoc
241
- [issues]: #issues
242
- [bugs]: #bugs
243
- [credits]: #credits
244
- [license]: #license
245
-