mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.10.3.1
This commit is contained in:
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.files.cnvs; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*;
|
||||
import gplx.core.primitives.*; import gplx.xowa.wms.*;
|
||||
import gplx.core.primitives.*; import gplx.xowa.bldrs.wms.*;
|
||||
public class Xof_img_wkr_resize_img_imageMagick implements Xof_img_wkr_resize_img {
|
||||
private final Xowmf_mgr wmf_mgr; private final ProcessAdp cmd_convert, cmd_convert_svg_to_png;
|
||||
private boolean init_needed = true;
|
||||
@@ -24,8 +24,8 @@ public class Xof_img_wkr_resize_img_imageMagick implements Xof_img_wkr_resize_im
|
||||
this.wmf_mgr = wmf_mgr; this.cmd_convert = cmd_convert; this.cmd_convert_svg_to_png = cmd_convert_svg_to_png;
|
||||
}
|
||||
public boolean Resize_exec(Io_url src, Io_url trg, int trg_w, int trg_h, int ext_id, String_obj_ref rslt_val) {
|
||||
if (!Io_mgr.I.ExistsFil(src)) return false;
|
||||
Io_mgr.I.CreateDirIfAbsent(trg.OwnerDir());
|
||||
if (!Io_mgr.Instance.ExistsFil(src)) return false;
|
||||
Io_mgr.Instance.CreateDirIfAbsent(trg.OwnerDir());
|
||||
if (init_needed) {
|
||||
init_needed = false;
|
||||
Gfo_usr_dlg usr_dlg = Xoa_app_.Usr_dlg();
|
||||
|
||||
@@ -23,8 +23,8 @@ public class Xof_img_wkr_resize_img_mok implements Xof_img_wkr_resize_img {
|
||||
int src_w = src_size.Width(), src_h = src_size.Height();
|
||||
if (trg_w < 1) throw Err_.new_wo_type("trg_w must be > 0", "trg_w", trg_w);
|
||||
if (trg_h < 1) trg_h = Xof_xfer_itm_.Scale_h(src_w, src_h, trg_w);
|
||||
Io_mgr.I.SaveFilStr(trg, SizeAdp_.new_(trg_w, trg_h).To_str());
|
||||
Io_mgr.Instance.SaveFilStr(trg, SizeAdp_.new_(trg_w, trg_h).To_str());
|
||||
return true;
|
||||
}
|
||||
public static final Xof_img_wkr_resize_img_mok _ = new Xof_img_wkr_resize_img_mok(); Xof_img_wkr_resize_img_mok() {}
|
||||
public static final Xof_img_wkr_resize_img_mok Instance = new Xof_img_wkr_resize_img_mok(); Xof_img_wkr_resize_img_mok() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user