Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Commits on Jan 23, 2013
@nanaya Enforce colorspace for resizing.
Especially when the source is CMYK or some other colorspace.

Fixes issue #232.
aadde9d
@nanaya Added tag autocompletion for batch job.
As per request in #192.
1d5ba04
View
6 app/assets/javascripts/init.autocomplete.js.erb
@@ -8,4 +8,10 @@ jQuery(document).ready(function($) {
source: '<%= url.ac_tag_name_path %>',
minLength: 2
});
+ if ($('#edit-form').length && $('textarea.ac-tags').length) {
+ new TagCompletionBox($('textarea.ac-tags')[0]);
+ if (TagCompletion) {
+ TagCompletion.observe_tag_changes_on_submit($('#edit-form')[0], $('input.ac-tags')[0], null);
+ };
+ };
});
View
2  app/views/batch/create.html.erb
@@ -46,7 +46,7 @@
<tr>
<th> <label for="post_tags"><%= t('.tags') %></label> </th>
<td>
- <%= text_area "post", "tags", :value => params[:tags], :size => "60x2", :tabindex => 3 %>
+ <%= text_area "post", "tags", :value => params[:tags], :size => "60x2", :tabindex => 3, :class => 'ac-tags' %>
</td>
</tr>
View
4 lib/moebooru/resizer.rb
@@ -32,6 +32,10 @@ def resize(file_ext, read_path, write_path, output_size, output_quality)
if write_format =~ /\Ajpe?g\z/
f.sampling_factor '2x2,1x1,1x1'
end
+ # Any other colorspaces suck for storing images.
+ # Since we're just resizing stuff here, actual colorspace shouldn't
+ # matter much.
+ f.colorspace 'RGB'
f.quality output_quality.to_s
end
image.write write_path

No commit comments for this range

Something went wrong with that request. Please try again.