Skip to content

Commit 16d595c

Browse files
committed
,local_photo_path added to copy_to_local_file()
1 parent 9735504 commit 16d595c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/models/spectrum.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def self.weekly_tallies
114114

115115
# finds the brightest row of the image and uses that as its sample row
116116
def find_brightest_row
117-
photo.copy_to_local_file(:original)
117+
photo.copy_to_local_file(:original,local_photo_path)
118118
image = Magick::ImageList.new(local_photo_path)
119119
brightest_row = 0
120120
brightest = 0
@@ -141,7 +141,7 @@ def find_brightest_row
141141
def extract_data
142142
pixels = []
143143

144-
photo.copy_to_local_file(:original)
144+
photo.copy_to_local_file(:original,local_photo_path)
145145
image = Magick::ImageList.new(local_photo_path)
146146
# saved sample_row may be greater than image height, so temporarily compensate,
147147
# but preserve sample_row in case we rotate back or something
@@ -280,7 +280,7 @@ def clone_calibration(clone_id)
280280

281281
# rotate clockwise
282282
def rotate
283-
photo.copy_to_local_file(:original)
283+
photo.copy_to_local_file(:original,local_photo_path)
284284
image = Magick::ImageList.new(local_photo_path)
285285
image.rotate!(-90)
286286
image.write('public' + photo.url)
@@ -289,7 +289,7 @@ def rotate
289289

290290
# horizontally flips image to match reversed spectrum, toggles 'reversed' flag
291291
def reverse
292-
photo.copy_to_local_file(:original)
292+
photo.copy_to_local_file(:original,local_photo_path)
293293
image = Magick::ImageList.new(local_photo_path)
294294
image.flop!
295295
image.write('public' + photo.url)

0 commit comments

Comments
 (0)