Обложки (cover)

Список разделов foobar2000 Общая информация

Описание: Общее обсуждение по аудиоплееру foobar2000

Сообщение #61 meDveD » 29.05.2010, 13:49

ArtemijG ,что Вы имеете в виду под понятием архив ? RAR, 7 Zip ?
он имеет ввиду архивы, не важно какие, фубар читает и rar и 7zip и LHA и Unix с помощью плагинов, но обложки не показывает.
meDveD M
Откуда: SPb
Репутация: 52
С нами: 17 лет 3 месяца

Сообщение #62 Старик » 31.05.2010, 22:27

Axess:mp3tag не умеет удалять из FLAC блоки метаданных - при "удалении" он просто забивает место блока пустотой (00h)
а обложка хранится именно в блоке метаданных ".image/jpeg" (у меня по крайней мере)
Стало быть чревато во флак обложки вшивать. Надо бы это в FAQ упомянуть, в главе, где говорится, про удаление обложек с помощью mp3tag.
Последний раз редактировалось Старик 31.05.2010, 22:28, всего редактировалось 1 раз.
Старик
Репутация: -1
С нами: 14 лет 10 месяцев

Сообщение #63 Mr.Merak » 31.05.2010, 22:50

Еще у кого-то есть мысли по этому поводу?
Mr.Merak M
Откуда: Украина
Репутация: 27
С нами: 17 лет 7 месяцев

Сообщение #64 DRON » 31.05.2010, 23:56

Укоротить FLAC-и можно с помощью metaflac.exe.
Строка запуска (для mp3tag) примерно такая: --remove --block-type=PADDING --dont-use-padding "%_path%"
DRON M
Аватара
Откуда: Санкт-Петербург
Репутация: 113
С нами: 15 лет 10 месяцев

Сообщение #65 Старик » 01.06.2010, 02:39

2_DRON_, спасибо, за подсказку, утилита действительно работает. Вот только, для каждого файла отдельное окно открывается. Есть ли такая строка, что бы запустить обработку, без открытия окон, т.е. для большого кол-ва файлов?
Старик
Репутация: -1
С нами: 14 лет 10 месяцев

Сообщение #66 DRON » 01.06.2010, 11:01

Старик:Есть ли такая строка, что бы запустить обработку, без открытия окон, т.е. для большого кол-ва файлов?
Воспользуйтесь какой нибудь "скрывалкой" типа hidcon.exe или nircmd.exe.
DRON M
Аватара
Откуда: Санкт-Петербург
Репутация: 113
С нами: 15 лет 10 месяцев

Сообщение #67 ichch » 21.06.2010, 11:18

Доброго времени суток.

Такая ситуация: альбомы по папкам, в каждой папке один covert art формата jpg.
Вопрос: умеет ли foobar или plugins к нему автоматически вставлять обложки jpg из папок в ID3 Tag соответствующих mp3, расположенных в тех же папках, что и jpg, чтобы все красиво отображалось в IPOD?

заранее спасибо за помощь.
ichch
Репутация: 0
С нами: 13 лет 9 месяцев

Сообщение #68 Mr.Merak » 21.06.2010, 13:17

ichch:вставлять обложки jpg из папок в ID3 Tag соответствующих mp3
так лень шапку читать?
Mr.Merak M
Откуда: Украина
Репутация: 27
С нами: 17 лет 7 месяцев

Сообщение #69 ichch » 21.06.2010, 16:25

Прошу прощения, не уточнил.
Необходимо сделать cover art к немаленькому кол-ву папок. на каждую щелкать - с ума сойдешь.
Есть ли какие-нибудь программные средства, которые смогут взять картинку из каждой папки и вставить ид тагом в каждый мп3 файлов в той же папке?
прошу прощения за мой албанский.)
есть ли софт, где можно выделить все папки ctrl+A и сказать ему засунь в каждый файл из каждой папки ИД таг ковер арт, находящийся в той же папки, что и мп3*?
спасибо

added:
и еще хотелось бы ID tag названия альбома добавить также по названию папки в каждый из присутствующих мп3 внутри
Последний раз редактировалось ichch 21.06.2010, 17:23, всего редактировалось 1 раз.
ichch
Репутация: 0
С нами: 13 лет 9 месяцев

Сообщение #70 Mr.Merak » 21.06.2010, 18:27

2ichch
"это фантастика" (с)
Mr.Merak M
Откуда: Украина
Репутация: 27
С нами: 17 лет 7 месяцев

Сообщение #71 Aum » 07.07.2010, 14:50

Подскажите можно ли отображать заранее подготовленные обложки к радиостанциям? (PSS+CUI)
вот скриптик у "риалту" нашел:
Код: Выделить всё
$replace(%path%,%filename_ext%,)*
-$if($strstr(%_path%,ultra),images\radio\ultra.png)
-$if($strstr(%_path%,maximum),images\radio\maximum.png)
--components\default.png

как скрипт правильно задать, что б он обложку для определенной станции брал (какое в скрипте имя станции должно быть: адрес, титл)?
и возможно ли его в "коллумс артворк" прописать, чтоб везде отображались нужные обложки?
Aum M
Аватара
Репутация: 20
С нами: 14 лет

Сообщение #72 Izotop » 07.07.2010, 20:57

Aum:как скрипт правильно задать, что б он обложку для определенной станции брал (какое в скрипте имя станции должно быть: адрес, титл)?
В том то всё и дело, что никто не знает как выглядит Ваш плейлист с онлайн радиостанциями и какие данные он получает от конкретного радио-сервера...
Потому врятли можна угадать, как должен будет выглядеть скрипт для конкретно Вашего случая...
*пыво*
Izotop M
Аватара
Откуда: Зеленоград - Харьков
Репутация: 69
С нами: 15 лет 4 месяца

Сообщение #73 Aum » 07.07.2010, 21:59

Понял. Вот пример:
Изображение

остальные станции дают инфо похожую как в первом случае..
что замудрить? а в остальных, я на примере этих..))
Aum M
Аватара
Репутация: 20
С нами: 14 лет

Сообщение #74 Izotop » 07.07.2010, 22:26

Так можно ведь назвать файлы-обложки для радиостанций именами, содержащими данные о имени станции из Folder Name
Пример имени обложки для "1"::: 16bit.fm.jpg
Пример имени обложки для "2"::: radio.zaycev.net.jpg

и потом сравнить часть имени Folder Name с именем файла-обложки
*пыво* *пыво* *пыво*
Последний раз редактировалось Izotop 07.07.2010, 22:37, всего редактировалось 1 раз.
Izotop M
Аватара
Откуда: Зеленоград - Харьков
Репутация: 69
С нами: 15 лет 4 месяца

Сообщение #75 Aum » 08.07.2010, 14:16

спсб. поковырялся и понял что это нфиг не нужная возня, а если станций 35 будет или больше...))
Пришел к старой истине: фубар - хороший плеер для файлов, а радио гораздо удобнее слушать в специально разработанной для этого программе))
Aum M
Аватара
Репутация: 20
С нами: 14 лет

Сообщение #76 Cerber » 16.07.2014, 00:57

Если тема ещё жива, то хотелось бы задать вопрос. Как в той самой WSH панели от Alex Realist
Код: Выделить всё
var g_img_default = gdi.Image(fb.FoobarPath + "images/similar_wmp_mod/nocover.png");
var WshShell = new ActiveXObject("WScript.Shell");
var g_focus_metadb = null;

function on_paint(gr){
   g_focus_metadb = fb.GetFocusItem();
   if(g_focus_metadb==null){
      var g_img = g_img_default;
      gr.FillSolidRect(0, 0, window.Width, window.Height, window.GetColorCUI(3));
   }
   else{
      var g_img = utils.GetAlbumArtV2(g_focus_metadb, 0);
      if (g_img==null){
         g_img = g_img_default;
         gr.FillSolidRect(0, 0, window.Width, window.Height, window.GetColorCUI(3));
      }
   }
   gr.DrawImage(g_img, 0, 0, window.Width, window.Height, 0, 0, g_img.Width, g_img.Height);
}
function on_item_focus_change(){
   window.Repaint();
}
function on_mouse_lbtn_dblclk(){
   if(g_focus_metadb==null) {} else utils.GetAlbumArtAsync(window.ID, g_focus_metadb, 0);
}
function on_get_album_art_done(metadb, art_id, image, image_path){
   switch (image_path){
      case "": break;
      case fb.TitleFormat("%path%").EvalWithMetadb(metadb): break;
      default: WshShell.run('"'+image_path+'"');
   }
}
//EOF
сделать так, чтобы показывались оригинальные пропорции обложки, а не растягивались по длине/ширине?
Cerber M
Аватара
Репутация: 1
С нами: 9 лет 8 месяцев

Сообщение #77 kgena_ua » 16.07.2014, 11:56

Cerber, пример скрипта для вывода изображения с правильными пропорциями:
Код: Выделить всё
var ww,wh;
var g_img;

function on_size(){
    ww = window.Width;
    wh = window.Height;
}

function on_paint(gr) {
    g_img = gdi.Image(fb.ProfilePath + "\\maybe\\textures\\cover.jpg");   

    if (g_img){
        var scale_w = ww / g_img.Width;
        var scale_h = wh / g_img.Height;
        var scale = Math.min(scale_w, scale_h);
        var pos_x = 0;
        var pos_y = 0;

        if (scale_w < scale_h) pos_y = (wh - g_img.Height * scale) / 2;
        else if (scale_w > scale_h) pos_x = (ww - g_img.Width * scale) / 2;
               
        g_img = g_img.CreateRawBitmap();
        gr.GdiDrawBitmap(g_img, pos_x, pos_y, g_img.Width * scale, g_img.Height * scale, 0, 0, g_img.Width, g_img.Height);
    }
}
kgena_ua M
Аватара
Откуда: Украина, Днепр
Репутация: 504
С нами: 10 лет 11 месяцев

Сообщение #78 Cerber » 17.07.2014, 08:44

kgena_ua, а не подскажете, как подкорректировать скрипт ниже? Дело в том, что он бы меня устраивал целиком и полностью, если бы не один нюанс. Обложки в нём отображаются корректно, со всеми пропорциями, но изображение при этом немного размыто. Если же в 89 строке сменить значение на больше "1", то размытие пропадает, но теряются пропорции. Какой-то порочный круг.
Код: Выделить всё
//edit this line or comment it out if you don't a fixed size....
//window.MinWidth = window.MinHeight = window.MaxWidth = window.MaxHeight = 200;

var RefreshInterval = 50;

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//no need to edit anything below here///////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var g_metadb = fb.GetFocusItem();
var NewImage, CurImage, new_width, new_height = null;
var CurSize = null;
var NewSize = null;
var ww = window.Width;
var wh = window.Height;
var opacity = 255;
var step = Math.min(Math.ceil(255*RefreshInterval/300),255);
var timer = null;
var cur_btn = null;

var g_tooltip = window.CreateTooltip();
var hover = null;
var dui = window.InstanceType;
window.GetProperty("aspect",1);
window.GetProperty("id",0);
window.SetProperty("BtnimageDirectory", fb.FoobarPath + "images/");
window.GetProperty("Buttons", 1);

function RGB(r,g,b) {
return (0xff000000|(r<<16)|(g<<8)|(b));
}

function on_timer(id) {
Buttons.OnTimer && Buttons.OnTimer(id);
if (timer && id==timer.ID) {
if (opacity>0) {
opacity = Math.max(opacity-step,0);
window.Repaint();
} else {
CurImage = NewImage;
CurSize = NewSize;
NewImage = null;
NewSize = null;
opacity = 255;
timer && window.KillTimer(timer);
timer = null;
CollectGarbage(); // Release memory.
//window.RepaintRect(this.x, this.y, this.width, this.height);
}
}
}

function on_size() {
ww = window.Width;
wh = window.Height;
Buttons.OnResize && Buttons.OnResize(ww, wh);

}

function on_colors_changed() {
window.Repaint();
}

function on_paint(gr) {
gr.FillSolidRect(0, 0, ww, wh, dui ==1 ? window.GetColorDUI(1) : window.GetColorCUI(3));
var Img, size;
if (Img = CurImage) {
currentopacity = opacity;
size = CurSize;
gr.DrawImage(Img, size.x, size.y, size.width, size.height, 0, 0, Img.width, Img.height, 0, opacity);
}
if (Img = NewImage) {
currentopacity = 255-opacity;
size = NewSize;
gr.DrawImage(Img, size.x, size.y, size.width, size.height, 0, 0, Img.width, Img.height, 0, 255-opacity);
}

//gr.DrawImage(g_img, pos_x, pos_y, new_width, new_height, 0, 0, g_img.Width, g_img.Height);

if(dui == 1)
{
gr.DrawRect(0,0, window.Width, window.Height, 1.0, RGB(160,160,160));
}
Buttons.OnPaint && Buttons.OnPaint(gr);
}

function CalcNewImgSize(img) {
var size = {x:0, y:0, width:ww, height:wh};
if (img) {
if(window.GetProperty("aspect") == 1) {
var scale_w = ww / img.Width;
var scale_h = wh / img.Height;
scale = Math.min(scale_w, scale_h);
if (scale_w < scale_h)
size.y = (wh - g_img.height * scale) / 2;
else if (scale_w > scale_h)
size.x = (ww - img.Width * scale) / 2;
size.width = img.Width * scale;
size.height = img.Height * scale
}
}
return size;
}

function on_playback_new_track(){
Buttons.SetPauseStatus && Buttons.SetPauseStatus();
changeImage();
}

function on_playback_pause(state) {
Buttons.SetPauseStatus && Buttons.SetPauseStatus();
window.Repaint();
}

function on_playback_stop(reason){
Buttons.SetPauseStatus && Buttons.SetPauseStatus();
}

function changeImage() {
g_metadb = fb.IsPlaying ? fb.GetNowPlaying() : fb.GetFocusItem();

is_embedded = "No";
if(g_metadb) {
type = window.GetProperty("id");
g_img = utils.GetAlbumArtEmbedded(g_metadb.rawpath, type);
if(g_img) {
is_embedded = "Yes";
} else {
g_img = utils.GetAlbumArtV2(g_metadb, type);
}
if (NewImage) {
CurImage = NewImage;
CurSize = NewSize;
opacity = 255;
}
NewImage = g_img;
NewSize = CalcNewImgSize(NewImage);
if (!timer) timer = window.CreateTimerInterval(RefreshInterval);

window.Repaint();
}

//if ( fb.IsPlaying) return;

}

function on_item_focus_change()
{
changeImage();
}

changeImage();

function on_mouse_move(x,y) {
Buttons.OnMouseMove && Buttons.OnMouseMove(x, y);
if(!hover) {
if (NewImage)
{
g_tooltip.Text = "Embedded image: " + is_embedded + ". Actual size: " + NewImage.Width + " x " + NewImage.Height + ". Current size: " + Math.round(NewSize.width) + " x " + Math.round(NewSize.height) + ".";
}
else if (CurImage)
{
g_tooltip.Text = "Embedded image: " + is_embedded + ". Actual size: " + CurImage.Width + " x " + CurImage.Height + ". Current size: " + Math.round(CurSize.width) + " x " + Math.round(CurSize.height) + ".";
}
g_tooltip.Activate();
hover = true;
}
}

function on_mouse_leave() {
Buttons.OnMouseLeave && Buttons.OnMouseLeave();
g_tooltip.Deactivate();
hover = null;
}

function on_mouse_lbtn_down(x,y){
Buttons.OnLbtnDown && Buttons.OnLbtnDown(x, y);
}

function on_mouse_lbtn_up(x, y) {
Buttons.OnLbtnUp && Buttons.OnLbtnUp(x, y);
}


function on_mouse_rbtn_up(x, y) {
var MF_SEPARATOR = 0x00000800;
var MF_STRING = 0x00000000;
var _menu = window.CreatePopupMenu();
var idx;
_menu.AppendMenuItem(MF_STRING, 1, "Refresh");
_menu.AppendMenuItem(MF_SEPARATOR, 0, 0);
_menu.AppendMenuItem(MF_STRING, 2, "Correct Aspect Ratio");
_menu.AppendMenuItem(MF_SEPARATOR, 0, 0);
_menu.AppendMenuItem(MF_STRING, 4, "Front Cover");
_menu.AppendMenuItem(MF_STRING, 5, "Back Cover");
_menu.AppendMenuItem(MF_STRING, 6, "Disc");
_menu.AppendMenuItem(MF_STRING, 7, "Icon");
_menu.AppendMenuItem(MF_STRING, 8, "Artist");
_menu.AppendMenuItem(MF_SEPARATOR, 0, 0);
//_menu.AppendMenuItem(MF_STRING, 9, "Properties");
_menu.AppendMenuItem(MF_STRING, 10, "Configure...");
_menu.CheckMenuItem(2, window.GetProperty("aspect") == 1 ? 0x0 : 0x8);
_menu.CheckMenuRadioItem(4, 8, window.GetProperty("id")+4);
idx = _menu.TrackPopupMenu(x, y);
switch(idx) {
case 1:
changeImage();
break;
case 2:
window.GetProperty("aspect") == 0 ? window.SetProperty("aspect", 1) : window.SetProperty("aspect", 0);
changeImage();
window.Repaint();
break;
case 4:
case 5:
case 6:
case 7:
case 8:
window.SetProperty("id", idx-4);
changeImage();
break;
case 9:
window.ShowProperties();
break;
case 10:
window.ShowConfigure();
break;
}
_menu.Dispose();
return true;
}

//if (window.GetProperty("Buttons") == 1) {
if (true) {
var Buttons = new function () {
var BtnDir = window.GetProperty("BtnimageDirectory");
var Position = 4;
this.x = 100;
this.y =0;
this.width = 0;
this.height = 0;
var opacity = 0;
var defaultOp = 150;
var hbtn = null;
var dbtn = null;
var timer = null;
var RefreshInterval = 50;
var step = 40;
var dstOp = 0;
var _this = this;
this.BtnsArray = new Array();

// Define button class ------------------------------------------------
var Button = function (x, y, img, OnClick, tiptext) {
this.x = x;
this.y = y;
this.width = img.width;
this.height = img.height;
this.Img = img;
this.tiptext = tiptext;
this.state = 0; // 0=normal, 1=hover, 2=down, 3=disabled
this.enabled = true;
this.OnClick = OnClick;
var Tooltip = g_tooltip;

this.isXYinBtn = function (x, y) {
if (!this.enabled) return false;
return (x >= this.x && y >= this.y && x<= this.x + this.width && y <= this.y + this.height) ? true : false;
};

this.Draw = function (gr, op) {
if (!opacity) return;
gr.DrawImage(this.Img, this.x, this.y, this.width, this.height, 0, 0, this.width, this.height, 0, opacity);
};

this.ChangeState = function (s, enabled) {
//if (!this.enabled && !enabled) return;
if (enabled===undefined) {
if (s==this.state)
return;
else
this.state = s;
} else {
this.enabled = enabled;
this.state = enabled ? 0 : 3;
}
if (s==1) {
Tooltip.Text = this.tiptext;
Tooltip.Activate();
} else
Tooltip.Deactivate();
if (opacity)
window.RepaintRect(Math.max(0, this.x), Math.max(0, this.y),
Math.min(window.width,this.width), Math.min(window.height, this.height));
};
};

// Create buttons --------------------------------
var img_play = gdi.image(BtnDir+"Play.png");
var img_pause = gdi.image(BtnDir+"Pause.png");
var img_next = gdi.image(BtnDir+"Next.png");
var img_prev = gdi.image(BtnDir+"Prev.png");
var img_reload = gdi.image(BtnDir+"reload.png");
var img_albumart = gdi.image(BtnDir+"albumart.png");
var img_stop = gdi.image(BtnDir+"stop.png");
var xOffset = this.x;
this.BtnsArray.push(new Button(xOffset, this.y, img_reload, function(){changeImage();}, "Refresh"));
xOffset += this.BtnsArray[this.BtnsArray.length-1].width;
this.BtnsArray.push(new Button(xOffset, this.y, img_prev, function(){fb.Prev();}, "Previous"));
xOffset += this.BtnsArray[this.BtnsArray.length-1].width;
this.BtnsArray.push(PlayBtn = new Button(xOffset, this.y, img_play, function(){fb.PlayOrPause();}, ""));
xOffset += this.BtnsArray[this.BtnsArray.length-1].width;
this.BtnsArray.push(new Button(xOffset, this.y, img_stop, function(){fb.Stop();}, "Stop"));
xOffset += this.BtnsArray[this.BtnsArray.length-1].width;
this.BtnsArray.push(new Button(xOffset, this.y, img_next, function(){fb.Next();}, "Next"));
xOffset += this.BtnsArray[this.BtnsArray.length-1].width;
this.BtnsArray.push(new Button(xOffset, this.y, img_albumart, function(){fb.RunContextCommand("Run service/AlbumArt");}, "NexAlbumArt"));
xOffset += this.BtnsArray[this.BtnsArray.length-1].width;


PlayBtn.tiptext_play = "Play";
PlayBtn.tiptext_pause = "Pause";
PlayBtn.tiptext = fb.IsPaused ? PlayBtn.tiptext_play : PlayBtn.tiptext_pause;
PlayBtn.img_pause = img_pause;
PlayBtn.img_play = img_play;
PlayBtn.Img = fb.IsPlaying ? PlayBtn.img_pause : PlayBtn.img_play;
PlayBtn.ChangeState(null, true);
this.PlayBtn = PlayBtn;

this.width = xOffset-this.x;
this.height = PlayBtn.height;



this.SetPauseStatus = function () {
if (fb.IsPlaying && !fb.IsPaused) {
PlayBtn.Img = PlayBtn.img_pause;
PlayBtn.tiptext = PlayBtn.tiptext_pause;
} else {
PlayBtn.Img = PlayBtn.img_play;
PlayBtn.tiptext = PlayBtn.tiptext_play;
}
};

var isXYinBtns = function (x, y) {
return (x >= _this.x && y >= _this.y && x<= _this.x + _this.width && y <= _this.y + _this.height) ? true : false;
};

var Fading = function (dstop) {
if (dstOp==dstop) return;
dstOp = dstop;
if (!timer) timer = window.CreateTimerInterval(RefreshInterval);
};

this.OnPaint = function (gr) {
if (!opacity) return;
for (var i=0; i<this.BtnsArray.length; i++)
this.BtnsArray[i].Draw(gr, opacity);
};

this.OnMouseMove = function (x, y) {
if (isXYinBtns(x, y)) {
if (opacity!=255) {
dstOp = 255;
opacity = 255;
window.RepaintRect(Math.max(0, this.x), Math.max(0, this.y),
Math.min(window.width,this.width), Math.min(window.height, this.height));
}
} else if (opacity!=defaultOp)
Fading(defaultOp);

if (dbtn) {
if (dbtn.isXYinBtn(x, y))
dbtn.ChangeState(2);
else
dbtn.ChangeState(1);
} else {
for (var i=0; i < this.BtnsArray.length ; i++)
if (this.BtnsArray[i].isXYinBtn(x,y)) {
if (hbtn!=this.BtnsArray[i]) {
if(hbtn) hbtn.ChangeState(0);
hbtn = this.BtnsArray[i];
hbtn.ChangeState(1);
}
break;
}
if (i==this.BtnsArray.length) {
if (hbtn) {
hbtn.ChangeState(0);
hbtn = null;
}
}
}
};

this.OnLbtnDown = function (x, y) {
if (hbtn) {
dbtn = hbtn;
dbtn.ChangeState(2);
}
};

this.OnLbtnUp = function (x, y) {
if (dbtn) {
if (dbtn.state==2) {
dbtn.OnClick();
dbtn.ChangeState(1);
}
dbtn = null;
this.OnMouseMove(x, y);
}
};

this.OnMouseLeave = function () {
Fading(0);
if (hbtn) {
hbtn.ChangeState(0);
hbtn = null;
}
};

this.OnTimer = function (id) {
if (timer && id==timer.ID) {
if (opacity==dstOp) {
timer && window.KillTimer(timer);
timer = null;
CollectGarbage(); // Release memory.
//window.RepaintRect(this.x, this.y, this.width, this.height);
} else {
if (opacity<dstOp)
opacity = Math.min(opacity+step, dstOp);
else
opacity = Math.max(opacity-step, dstOp);
window.RepaintRect(Math.max(0, this.x), Math.max(0, this.y),
Math.min(window.width,this.width), Math.min(window.height, this.height));
}
}
};

this.OnResize = function (ww, wh) {
if (Position==1 || Position==4)
this.x = (ww-this.width)/2;
else if (Position==2 || Position==5)
this.x = ww-this.width;

if (Position>2)
this.y = wh-this.height;

var x = this.x;
for (var i=0; i<this.BtnsArray.length; i++) {
this.BtnsArray[i].x = x;
x += this.BtnsArray[i].width;
if (Position>2)
this.BtnsArray[i].y = wh-this.BtnsArray[i].height;
else this.BtnsArray[i].y = 0;
};
this.width = x-this.x;
};
this.OnResize(window.Width, window.Height);

} ();

} else
var Buttons = {};
Cerber M
Аватара
Репутация: 1
С нами: 9 лет 8 месяцев

Сообщение #79 kgena_ua » 17.07.2014, 13:18

Cerber, переменной aspect присваиваются значения 0 или 1 через пункт меню "Correct Aspect Ratio" (пр.кл).
Про "размытие" могу сказать только то, что если выводить изображение через gr.GdiDrawBitmap картинка выглядит четче чем при
выводе используя gr.DrawImage. С чем это связано - не знаю.

Спойлер
Безымянный.jpg
kgena_ua M
Аватара
Откуда: Украина, Днепр
Репутация: 504
С нами: 10 лет 11 месяцев

Сообщение #80 LUR » 17.07.2014, 13:19

Cerber, попробуйте заменить функцию CalcNewImgSize на приведенную ниже, и скажите, что получилось. У меня вроде как не замыливается, тут проще арифметика.
Код: Выделить всё
function CalcNewImgSize(img) {
   var size = {x:0, y:0, width:ww, height:wh};
   if (img) {
      if(window.GetProperty("aspect") == 1) {
         if(ww > wh) {
            size.y = (wh - ww) / 2;
            size.height += ww - wh;
        }
        else {
            size.x = (ww - wh) / 2;
            size.width += wh - ww;
        }
      }
   }
   return size;
}
LUR M
Модератор
Аватара
Откуда: Минск
Репутация: 367
С нами: 11 лет 4 месяца

Пред.След.

Вернуться в Общая информация